mirror of
https://github.com/versia-pub/server.git
synced 2026-04-28 05:09:16 +02:00
fix(api): 🐛 Fix /api/v1/instance wrong SQL query causing 500s
This commit is contained in:
parent
203ea4b482
commit
9804180123
2 changed files with 1 additions and 1 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue