mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-09-30 07:12:36 -05:00
Fix upload page
This commit is contained in:
@@ -2,7 +2,13 @@ import { sql } from "~/db/sql";
|
||||
|
||||
const stm = sql.prepare(/*sql*/ `
|
||||
select count(*) as "count" from "UnvalidatedUserSubmittedImage"
|
||||
where "validatedAt" is null
|
||||
left join "Team" on
|
||||
"UnvalidatedUserSubmittedImage"."id" = "Team"."avatarImgId" or
|
||||
"UnvalidatedUserSubmittedImage"."id" = "Team"."bannerImgId"
|
||||
left join "Art" on
|
||||
"UnvalidatedUserSubmittedImage"."id" = "Art"."imgId"
|
||||
where "UnvalidatedUserSubmittedImage"."validatedAt" is null
|
||||
and ("Team"."id" is not null or "Art"."id" is not null)
|
||||
`);
|
||||
|
||||
export function countAllUnvalidatedImg() {
|
||||
|
||||
@@ -7,7 +7,13 @@ const stm = sql.prepare(/* sql */ `
|
||||
"UnvalidatedUserSubmittedImage"."url",
|
||||
"UnvalidatedUserSubmittedImage"."submitterUserId"
|
||||
from "UnvalidatedUserSubmittedImage"
|
||||
left join "Team" on
|
||||
"UnvalidatedUserSubmittedImage"."id" = "Team"."avatarImgId" or
|
||||
"UnvalidatedUserSubmittedImage"."id" = "Team"."bannerImgId"
|
||||
left join "Art" on
|
||||
"UnvalidatedUserSubmittedImage"."id" = "Art"."imgId"
|
||||
where "UnvalidatedUserSubmittedImage"."validatedAt" is null
|
||||
and ("Team"."id" is not null or "Art"."id" is not null)
|
||||
limit 1
|
||||
`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user