import { httpJson } from "@/lib/api/http" import { isApiError } from "@/lib/errors" import { mockUsers } from "@/lib/mock" import type { User } from "@/lib/types" export function listUsers() { return mockUsers } export async function getUserById(userId: string): Promise { try { return await httpJson(`/api/v1/users/${userId}`) } catch (err) { if (isApiError(err) && err.code === 404) return undefined throw err } } export async function getCurrentUserForLogin(): Promise { return httpJson("/api/v1/users/me") }