UNPKG

@archon-inc/sdk

Version:

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

17 lines (16 loc) 599 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getUserInfo; const Archon_js_1 = require("../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. */ async function getUserInfo(id) { const response = await Archon_js_1.Archon.request(`/users/user/${id}`, "GET"); if (response.status !== 200) { throw new Error(`Failed to retrieve user information for user ${id}.`); } return response.data; }