UNPKG

@archon-inc/sdk

Version:

Integrate easily to our government platform using this SDK. More info on https://archon.inc/sdk

14 lines (13 loc) 488 B
import { Archon } from "../Archon.js"; /** * Given a user id, return the user's information from the Archon authentication layer. * @param id The user id to get information for. * @returns The user's information. */ export default async function getUserInfo(id) { const response = await Archon.request(`/users/user/${id}`, "GET"); if (response.status !== 200) { throw new Error(`Failed to retrieve user information for user ${id}.`); } return response.data; }