mirror of
https://github.com/diced/zipline.git
synced 2025-04-11 23:31:17 -05:00
feat(files): Added more files to one page & filter by views
This commit is contained in:
parent
3336f3ee7e
commit
6352e91377
2 changed files with 6 additions and 1 deletions
|
@ -479,6 +479,11 @@ export default function FileTable({ id }: { id?: string }) {
|
|||
sortable: true,
|
||||
render: (file) => (file.favorite ? <Text c='yellow'>Yes</Text> : 'No'),
|
||||
},
|
||||
{
|
||||
accessor: 'views',
|
||||
sortable: true,
|
||||
render: (file) => file.views,
|
||||
},
|
||||
{
|
||||
accessor: 'id',
|
||||
hidden: searchField !== 'id' || searchQuery.id.trim() === '',
|
||||
|
|
|
@ -70,7 +70,7 @@ export default fastifyPlugin(
|
|||
|
||||
if (!user) return res.notFound('User not found');
|
||||
|
||||
const perpage = Number(req.query.perpage || '9');
|
||||
const perpage = Number(req.query.perpage || '30');
|
||||
if (isNaN(Number(perpage))) return res.badRequest('Perpage must be a number');
|
||||
|
||||
const searchQuery = req.query.searchQuery
|
||||
|
|
Loading…
Add table
Reference in a new issue