mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
/api/client/[id]/key Endpoint 삭제 및 프론트엔드와의 Zod 스키마 공유 구현
This commit is contained in:
@@ -8,7 +8,6 @@ import {
|
||||
createUserClient,
|
||||
getAllUserClients,
|
||||
getUserClient,
|
||||
getUserClientWithDetails,
|
||||
setUserClientStateToPending,
|
||||
registerUserClientChallenge,
|
||||
getUserClientChallenge,
|
||||
@@ -18,15 +17,6 @@ import { verifyPubKey, verifySignature, generateChallenge } from "$lib/server/mo
|
||||
import { isInitialMekNeeded } from "$lib/server/modules/mek";
|
||||
import env from "$lib/server/loadenv";
|
||||
|
||||
export const getUserClientEncPubKey = async (userId: number, clientId: number) => {
|
||||
const userClient = await getUserClientWithDetails(userId, clientId);
|
||||
if (!userClient || userClient.user_client.state === "challenging") {
|
||||
error(400, "Invalid client ID");
|
||||
}
|
||||
|
||||
return { encPubKey: userClient.client.encPubKey };
|
||||
};
|
||||
|
||||
export const getUserClientList = async (userId: number) => {
|
||||
const userClients = await getAllUserClients(userId);
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user