filter out disabled on latest and search
This commit is contained in:
parent
d06a0e212a
commit
2a833c12b7
|
|
@ -14,6 +14,7 @@ app.get('/latest', async ({ set }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const json = await db.selectFrom('videos')
|
const json = await db.selectFrom('videos')
|
||||||
|
.where('disabled', '=', false)
|
||||||
.select(['id', 'title', 'thumbnail', 'published', 'archived', 'channel', 'channelId', 'channelAvatar', 'channelVerified'])
|
.select(['id', 'title', 'thumbnail', 'published', 'archived', 'channel', 'channelId', 'channelAvatar', 'channelVerified'])
|
||||||
.orderBy('archived desc')
|
.orderBy('archived desc')
|
||||||
.limit(51)
|
.limit(51)
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ app.get('/search', async ({ headers, query: { search }, set, redirect, error })
|
||||||
const videos = await db.selectFrom('videos')
|
const videos = await db.selectFrom('videos')
|
||||||
.selectAll()
|
.selectAll()
|
||||||
.where('title', 'ilike', `%${search}%`)
|
.where('title', 'ilike', `%${search}%`)
|
||||||
|
.where('disabled', '=', false)
|
||||||
.execute()
|
.execute()
|
||||||
|
|
||||||
const html = await m(eta.render('./search', {
|
const html = await m(eta.render('./search', {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue