mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
/api/mek/register/initial Endpoint 추가
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
import { error, json } from "@sveltejs/kit";
|
||||
import { authenticate } from "$lib/server/modules/auth";
|
||||
import { authorize } from "$lib/server/modules/auth";
|
||||
import { getClientMekList } from "$lib/server/services/mek";
|
||||
import type { RequestHandler } from "@sveltejs/kit";
|
||||
|
||||
export const GET: RequestHandler = async ({ cookies }) => {
|
||||
const { userId, clientId } = authenticate(cookies);
|
||||
if (!clientId) {
|
||||
error(403, "Forbidden");
|
||||
}
|
||||
|
||||
const { userId, clientId } = await authorize(cookies, "activeClient");
|
||||
const { meks } = await getClientMekList(userId, clientId);
|
||||
return json({ meks });
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user