]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/utils.ts
Add history on server side
[github/Chocobozzz/PeerTube.git] / server / models / utils.ts
index 60b0906e80964a4d5bf3e128dbd08b0b6289095e..6694eda690b0570b0cd450decf3fbef5490539be 100644 (file)
@@ -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' ]) {