mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
/api/client/[id]/key Endpoint 삭제 및 프론트엔드와의 Zod 스키마 공유 구현
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { json } from "@sveltejs/kit";
|
||||
import { authenticate } from "$lib/server/modules/auth";
|
||||
import { clientListResponse } from "$lib/server/schemas/client";
|
||||
import { getUserClientList } from "$lib/server/services/client";
|
||||
import type { RequestHandler } from "@sveltejs/kit";
|
||||
|
||||
export const GET: RequestHandler = async ({ cookies }) => {
|
||||
const { userId } = authenticate(cookies);
|
||||
const { userClients } = await getUserClientList(userId);
|
||||
return json({ clients: userClients });
|
||||
return json(clientListResponse.parse({ clients: userClients }));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user