mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +01:00
fix(api): 🐛 Fix /api/v1/instance wrong SQL query causing 500s
This commit is contained in:
parent
203ea4b482
commit
9804180123
|
|
@ -32,7 +32,7 @@ export default apiRoute(async (req, matchedRoute, extraData) => {
|
||||||
})
|
})
|
||||||
.from(Notes)
|
.from(Notes)
|
||||||
.where(
|
.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;
|
)[0].count;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue