@peable/services
Advanced tools
Comparing version 0.0.43 to 0.0.44
interface User { | ||
id: string; | ||
username: string; | ||
name: string; | ||
email: string | null; | ||
role: string | null; | ||
avatar: string | null; | ||
profile_image_url: string | null; | ||
email: string; | ||
role: string; | ||
avatar: string; | ||
} | ||
@@ -10,0 +8,0 @@ declare const getUserById: (id?: string[], fields?: (keyof User)[]) => Promise<any>; |
import axios from "axios"; | ||
const getUserById = async (id, fields) => { | ||
try { | ||
const response = await axios.get("https://auth.peable.co" + `/api/users/${id}`); | ||
const response = await axios.get(`http://localhost:3001/api/users/${id}`); | ||
const user = fields | ||
@@ -6,0 +6,0 @@ ? fields.reduce((obj, key) => ({ ...obj, [key]: response.data[key] }), {}) |
{ | ||
"name": "@peable/services", | ||
"version": "0.0.43", | ||
"version": "0.0.44", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5260
94