mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 10:49:28 +02:00
variable columns for users list, more columns possible, badge display for statuses
This commit is contained in:
parent
654a188f80
commit
bc99dfe54e
17 changed files with 230 additions and 60 deletions
|
@ -16,7 +16,7 @@ import {
|
|||
videoPlaylistsSortValidator
|
||||
} from '../../middlewares'
|
||||
import { VideoChannelModel } from '../../models/video/video-channel'
|
||||
import { videoChannelsNameWithHostValidator, videosSortValidator } from '../../middlewares/validators'
|
||||
import { videoChannelsNameWithHostValidator, videosSortValidator, videoChannelsOwnSearchValidator } from '../../middlewares/validators'
|
||||
import { sendUpdateActor } from '../../lib/activitypub/send'
|
||||
import { VideoChannelCreate, VideoChannelUpdate } from '../../../shared'
|
||||
import { createLocalVideoChannel, federateAllVideosOfChannel } from '../../lib/video-channel'
|
||||
|
@ -48,6 +48,7 @@ videoChannelRouter.get('/',
|
|||
videoChannelsSortValidator,
|
||||
setDefaultSort,
|
||||
setDefaultPagination,
|
||||
videoChannelsOwnSearchValidator,
|
||||
asyncMiddleware(listVideoChannels)
|
||||
)
|
||||
|
||||
|
@ -114,7 +115,13 @@ export {
|
|||
|
||||
async function listVideoChannels (req: express.Request, res: express.Response) {
|
||||
const serverActor = await getServerActor()
|
||||
const resultList = await VideoChannelModel.listForApi(serverActor.id, req.query.start, req.query.count, req.query.sort)
|
||||
const resultList = await VideoChannelModel.listForApi({
|
||||
actorId: serverActor.id,
|
||||
start: req.query.start,
|
||||
count: req.query.count,
|
||||
sort: req.query.sort,
|
||||
search: req.query.search
|
||||
})
|
||||
|
||||
return res.json(getFormattedObjects(resultList.data, resultList.total))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue