fix(api): 🐛 Fix /api/v1/instance wrong SQL query causing 500s

This commit is contained in:
Jesse Wierzbinski 2024-04-17 15:55:53 -10:00
parent 203ea4b482
commit 9804180123
No known key found for this signature in database
2 changed files with 1 additions and 1 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -32,7 +32,7 @@ export default apiRoute(async (req, matchedRoute, extraData) => {
})
.from(Notes)
.where(
sql`EXISTS (SELECT 1 FROM "User" WHERE "User"."id" = ${Notes.authorId} AND "User"."instanceId" IS NULL)`,
sql`EXISTS (SELECT 1 FROM "Users" WHERE "Users"."id" = ${Notes.authorId} AND "Users"."instanceId" IS NULL)`,
)
)[0].count;