@peable/services
Advanced tools
Comparing version 0.0.41 to 0.0.42
import axios from "axios"; | ||
const getUserById = async (id, fields) => { | ||
try { | ||
const response = await axios.get("https://auth.peable.io" + `/api/users/${id}`); | ||
const response = await axios.get("https://auth.peable.co" + `/api/users/${id}`); | ||
const user = fields | ||
@@ -6,0 +6,0 @@ ? fields.reduce((obj, key) => ({ ...obj, [key]: response.data[key] }), {}) |
@@ -13,3 +13,3 @@ import { useState, useEffect } from "react"; | ||
// Fetch token from Peable Auth | ||
const response = await axios.post("https://auth.peable.io" + "/api/login", { | ||
const response = await axios.post("https://auth.peable.co" + "/api/login", { | ||
// Your login credentials (e.g., username, password) | ||
@@ -21,3 +21,3 @@ }); | ||
// Session retrieval (as before) | ||
const sessionResponse = await axios.get("https://auth.peable.io" + "/api/auth/session", { | ||
const sessionResponse = await axios.get("https://auth.peable.co" + "/api/auth/session", { | ||
withCredentials: true, | ||
@@ -24,0 +24,0 @@ }); |
{ | ||
"name": "@peable/services", | ||
"version": "0.0.41", | ||
"version": "0.0.42", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
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