Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Sep 12, 2024
1 parent 0760d49 commit e99d803
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions apps/dashboard/lib/trpc/routers/key/updateRootKeyName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ export const updateRootKeyName = t.procedure
},
});

const workspace = await db.query.workspaces.findFirst({
where: (table, { and, eq, isNull }) =>
and(eq(table.tenantId, ctx.tenant.id), isNull(table.deletedAt)),
const workspace = await db.query.workspaces.findFirst({
where: (table, { and, eq, isNull }) =>
and(eq(table.tenantId, ctx.tenant.id), isNull(table.deletedAt)),
});

if (!workspace) {
throw new TRPCError({
code: "NOT_FOUND",
message:
"We are unable to find the correct workspace. Please contact support using support@unkey.dev.",
});
}
if (!workspace) {
throw new TRPCError({
code: "NOT_FOUND",
message:
"We are unable to find the correct workspace. Please contact support using support@unkey.dev.",
});
}

if (!key || key.forWorkspaceId !== workspace.id) {
throw new TRPCError({
Expand Down

0 comments on commit e99d803

Please sign in to comment.