Format
This commit is contained in:
@@ -664,10 +664,7 @@ export async function handleTokenRevoke(
|
||||
|
||||
if (row.token_type === "refresh") {
|
||||
// Revoke refresh token and all its access tokens
|
||||
await db
|
||||
.deleteFrom("_emdash_oauth_tokens")
|
||||
.where("refresh_token_hash", "=", hash)
|
||||
.execute();
|
||||
await db.deleteFrom("_emdash_oauth_tokens").where("refresh_token_hash", "=", hash).execute();
|
||||
await db.deleteFrom("_emdash_oauth_tokens").where("token_hash", "=", hash).execute();
|
||||
} else {
|
||||
// Revoke just the access token
|
||||
|
||||
@@ -236,11 +236,7 @@ export async function handleOAuthClientUpdate(
|
||||
updates.scopes = input.scopes ? JSON.stringify(input.scopes) : "";
|
||||
}
|
||||
|
||||
await db
|
||||
.updateTable("_emdash_oauth_clients")
|
||||
.set(updates)
|
||||
.where("id", "=", clientId)
|
||||
.execute();
|
||||
await db.updateTable("_emdash_oauth_clients").set(updates).where("id", "=", clientId).execute();
|
||||
|
||||
// Fetch the updated row
|
||||
const updated = await db
|
||||
|
||||
Reference in New Issue
Block a user