mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-10 04:40:46 -05:00
14 lines
405 B
TypeScript
14 lines
405 B
TypeScript
import { sql } from "~/db/sql";
|
|
|
|
const stm = sql.prepare(/*sql*/ `
|
|
select count(*) as "count" from "UnvalidatedUserSubmittedImage"
|
|
inner join "Team" on
|
|
"UnvalidatedUserSubmittedImage"."id" = "Team"."avatarImgId" or
|
|
"UnvalidatedUserSubmittedImage"."id" = "Team"."bannerImgId"
|
|
where "validatedAt" is null
|
|
`);
|
|
|
|
export function countAllUnvalidatedImg() {
|
|
return stm.get().count as number;
|
|
}
|