Skip to content

Commit

Permalink
fix: column names
Browse files Browse the repository at this point in the history
  • Loading branch information
chronark committed Feb 26, 2025
1 parent 92aa053 commit 2668d62
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_keys_addPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const registerV1KeysAddPermissions = (app: App) =>
and(
eq(table.workspaceId, auth.authorizedWorkspaceId),
eq(table.id, req.keyId),
isNull(table.deletedAt),
isNull(table.deletedAtM),
),
}),
db.primary.query.permissions.findMany({
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_keys_addRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const registerV1KeysAddRoles = (app: App) =>
and(
eq(table.workspaceId, auth.authorizedWorkspaceId),
eq(table.id, req.keyId),
isNull(table.deletedAt),
isNull(table.deletedAtM),
),
}),
db.primary.query.roles.findMany({
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_keys_removePermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const registerV1KeysRemovePermissions = (app: App) =>
and(
eq(table.workspaceId, auth.authorizedWorkspaceId),
eq(table.id, req.keyId),
isNull(table.deletedAt),
isNull(table.deletedAtM),
),
}),

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_keys_removeRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const registerV1KeysRemoveRoles = (app: App) =>
and(
eq(table.workspaceId, auth.authorizedWorkspaceId),
eq(table.id, req.keyId),
isNull(table.deletedAt),
isNull(table.deletedAtM),
),
}),

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_keys_setPermissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export async function setPermissions(
and(
eq(table.workspaceId, auth.authorizedWorkspaceId),
eq(table.id, keyId),
isNull(table.deletedAt),
isNull(table.deletedAtM),
),
}),
db.primary.query.permissions.findMany({
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_keys_setRoles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export async function setRoles(
and(
eq(table.workspaceId, auth.authorizedWorkspaceId),
eq(table.id, keyId),
isNull(table.deletedAt),
isNull(table.deletedAtM),
),
}),
db.primary.query.roles.findMany({
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_keys_updateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ export const registerV1KeysUpdate = (app: App) =>
const { cache, db, usageLimiter, rbac } = c.get("services");
const auth = await rootKeyAuth(c);
const key = await db.primary.query.keys.findFirst({
where: (table, { eq, and, isNull }) => and(eq(table.id, req.keyId), isNull(table.deletedAt)),
where: (table, { eq, and, isNull }) => and(eq(table.id, req.keyId), isNull(table.deletedAtM)),
with: {
keyAuth: {
with: {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_keys_updateRemaining.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const registerV1KeysUpdateRemaining = (app: App) =>
const { cache, db, usageLimiter } = c.get("services");

const key = await db.readonly.query.keys.findFirst({
where: (table, { eq, isNull, and }) => and(eq(table.id, req.keyId), isNull(table.deletedAt)),
where: (table, { eq, isNull, and }) => and(eq(table.id, req.keyId), isNull(table.deletedAtM)),
with: {
keyAuth: {
with: {
Expand Down

0 comments on commit 2668d62

Please sign in to comment.