fix: unexpected hard-coding user ID
This commit is contained in:
parent
bb01750816
commit
17004f47c7
@ -21,7 +21,7 @@ const videoSchema = BiliVideoSchema.omit({ publishedAt: true })
|
||||
|
||||
export const getUnlabelledVideos = new Elysia({ prefix: "/videos" }).use(requireAuth).get(
|
||||
"/unlabelled",
|
||||
async () => {
|
||||
async ({ user }) => {
|
||||
return db.execute<z.infer<typeof videoSchema>>(sql`
|
||||
SELECT bm.*, ls.views, bu.username, bu.uid
|
||||
FROM (
|
||||
@ -43,8 +43,8 @@ export const getUnlabelledVideos = new Elysia({ prefix: "/videos" }).use(require
|
||||
WHERE aid IN (
|
||||
SELECT aid
|
||||
FROM internal.video_type_label
|
||||
TABLESAMPLE SYSTEM (2)
|
||||
WHERE user != 'i3wW8JdZ9sT3ASkk'
|
||||
TABLESAMPLE SYSTEM (10)
|
||||
WHERE user != ${user!.unqId}
|
||||
ORDER BY RANDOM()
|
||||
LIMIT 20
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user