Skip to content

Commit

Permalink
chore: add cache log
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark committed Oct 16, 2024
1 parent 4a6daf7 commit c55b5aa
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ dist
.dev.vars
.wrangler
.vitest
.react-email
.react-email

.secrets.json
secrets.ts
3 changes: 3 additions & 0 deletions apps/api/src/pkg/keys/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ export class KeyService {
return Ok({ valid: false, code: "NOT_FOUND" });
}

this.logger.info("data from cache or db", {
data,
});
if ((data.forWorkspace && !data.forWorkspace.enabled) || !data.workspace?.enabled) {
return Err(new DisabledWorkspaceError(data.workspace.id));
}
Expand Down
8 changes: 4 additions & 4 deletions apps/api/src/routes/v1_keys_verifyKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ export const registerV1KeysVerifyKey = (app: App) =>
code: val.valid ? ("VALID" as const) : val.code,
identity: val.identity
? {
id: val.identity.id,
externalId: val.identity.externalId,
meta: val.identity.meta ?? {},
}
id: val.identity.id,
externalId: val.identity.externalId,
meta: val.identity.meta ?? {},
}
: undefined,
};
c.executionCtx.waitUntil(
Expand Down

0 comments on commit c55b5aa

Please sign in to comment.