/api/client 아래의 Endpoint들을 tRPC로 마이그레이션

This commit is contained in:
static
2025-12-25 18:59:41 +09:00
parent 640e12d2c3
commit aa4a1a74ea
16 changed files with 128 additions and 271 deletions

View File

@@ -98,22 +98,6 @@ export const createUserClient = async (userId: number, clientId: number) => {
}
};
export const getAllUserClients = async (userId: number) => {
const userClients = await db
.selectFrom("user_client")
.selectAll()
.where("user_id", "=", userId)
.execute();
return userClients.map(
({ user_id, client_id, state }) =>
({
userId: user_id,
clientId: client_id,
state,
}) satisfies UserClient,
);
};
export const getUserClient = async (userId: number, clientId: number) => {
const userClient = await db
.selectFrom("user_client")