OR 조건 대신 IN 연산자를 사용하도록 일부 SQL 쿼리 수정

This commit is contained in:
static
2026-01-16 10:24:32 +09:00
parent cb5105a355
commit d8e18fb1d3
3 changed files with 4 additions and 4 deletions

View File

@@ -71,7 +71,7 @@ export const getAllValidClientMeks = async (userId: number, clientId: number) =>
.selectAll()
.where("client_master_encryption_key.user_id", "=", userId)
.where("client_master_encryption_key.client_id", "=", clientId)
.where((eb) => eb.or([eb("state", "=", "active"), eb("state", "=", "retired")]))
.where("state", "in", ["active", "retired"])
.execute();
return clientMeks.map(
({ user_id, client_id, version, state, encrypted_key, encrypted_key_signature }) =>