feat: citizenship applications
This commit is contained in:
+7
-1
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user