X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Futils.ts;h=6694eda690b0570b0cd450decf3fbef5490539be;hb=8b9a525a180cc9f3a98c334cc052dcfc8f36dcd4;hp=60b0906e80964a4d5bf3e128dbd08b0b6289095e;hpb=583cd0d2129dc855e599f981d70e537feade1632;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/utils.ts b/server/models/utils.ts index 60b0906e8..6694eda69 100644 --- a/server/models/utils.ts +++ b/server/models/utils.ts @@ -29,7 +29,7 @@ function getVideoSort (value: string, lastSort: string[] = [ 'id', 'ASC' ]) { ] } - return [ [ field, direction ], lastSort ] + return [ field.split('.').concat([ direction ]), lastSort ] } function getSortOnModel (model: any, value: string, lastSort: string[] = [ 'id', 'ASC' ]) {