-import { accountsGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators'
+import { accountsNameWithHostGetValidator, accountsSortValidator, videosSortValidator } from '../../middlewares/validators'
import { AccountModel } from '../../models/account/account'
import { VideoModel } from '../../models/video/video'
import { isNSFWHidden } from '../../helpers/express-utils'
import { AccountModel } from '../../models/account/account'
import { VideoModel } from '../../models/video/video'
import { isNSFWHidden } from '../../helpers/express-utils'
-accountsRouter.get('/:id',
- asyncMiddleware(accountsGetValidator),
+accountsRouter.get('/:accountName',
+ asyncMiddleware(accountsNameWithHostGetValidator),
-accountsRouter.get('/:id/videos',
- asyncMiddleware(accountsGetValidator),
+accountsRouter.get('/:accountName/videos',
+ asyncMiddleware(accountsNameWithHostGetValidator),
asyncMiddleware(listVideoAccountChannelsValidator),
asyncMiddleware(listVideoAccountChannels)
)
asyncMiddleware(listVideoAccountChannelsValidator),
asyncMiddleware(listVideoAccountChannels)
)