X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmiddlewares%2Fsort.ts;h=4588958988af88a759c35ebfbc7a6afb58ed0643;hb=bae616273d455d225d131eb17c56db6c20a0b6b3;hp=609046a4627cc8367b134f9ff1aaeb2e27bb5025;hpb=8054669f1181e815c435e76e81247eff32d41dc5;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/middlewares/sort.ts b/server/middlewares/sort.ts index 609046a46..458895898 100644 --- a/server/middlewares/sort.ts +++ b/server/middlewares/sort.ts @@ -1,4 +1,4 @@ -import * as express from 'express' +import express from 'express' import { SortType } from '../models/utils' const setDefaultSort = setDefaultSortFactory('-createdAt') @@ -16,7 +16,7 @@ function setBlacklistSort (req: express.Request, res: express.Response, next: ex // Set model we want to sort onto if (req.query.sort === '-createdAt' || req.query.sort === 'createdAt' || req.query.sort === '-id' || req.query.sort === 'id') { - // If we want to sort onto the BlacklistedVideos relation, we won't specify it in the query parameter ... + // If we want to sort onto the BlacklistedVideos relation, we won't specify it in the query parameter... newSort.sortModel = undefined } else { newSort.sortModel = 'Video'