mirror of
https://github.com/tribufu/sdk-js
synced 2025-06-16 02:34:19 +00:00
Fix getUserByKey endpoint
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tribufu",
|
"name": "tribufu",
|
||||||
"version": "0.1.10",
|
"version": "0.1.11",
|
||||||
"description": "Tribufu JS SDK",
|
"description": "Tribufu JS SDK",
|
||||||
"repository": "https://github.com/Tribufu/TribufuJs",
|
"repository": "https://github.com/Tribufu/TribufuJs",
|
||||||
"author": "Tribufu <contact@Tribufu.com>",
|
"author": "Tribufu <contact@Tribufu.com>",
|
||||||
|
@ -351,7 +351,7 @@ export class TribufuApi {
|
|||||||
*/
|
*/
|
||||||
private async getUserByKey(key: string, value: string): Promise<any[]> {
|
private async getUserByKey(key: string, value: string): Promise<any[]> {
|
||||||
const headers = this.getHeaders();
|
const headers = this.getHeaders();
|
||||||
const responseBody = await this.http.get<any[]>(`/v1/users/?${key}=${value}`, headers);
|
const responseBody = await this.http.get<any[]>(`/v1/users?${key}=${value}`, headers);
|
||||||
|
|
||||||
if (!responseBody) {
|
if (!responseBody) {
|
||||||
return [];
|
return [];
|
||||||
|
Reference in New Issue
Block a user