feat: citizenship applications

This commit is contained in:
Ivan Rezchikov
2026-06-23 19:03:10 +03:00
parent 58ec75c948
commit c60ab9e8f9
44 changed files with 1254 additions and 130 deletions
+7 -1
View File
@@ -1,5 +1,5 @@
import { getSessionUserId } from "@/lib/auth/session";
import { findUserById } from "@/lib/user/repository";
import { findUserById, findUsersByIds } from "@/lib/user/repository";
import { fetchKotosoftUser } from "./kotosoft/client";
import { cookies } from "next/headers";
@@ -12,4 +12,10 @@ export async function getCurrentUser() {
export async function getUser(id: string | null) {
if (!id) return null;
return findUserById(id);
}
export async function getUsers(...ids: (string | null | undefined)[]) {
const filtered = ids.filter((id): id is string => !!id);
if (filtered.length === 0) return [];
return findUsersByIds(filtered);
}