Skip to content

Commit a464fbb

Browse files
committed
mirage/config: Adjust "GET /crates/:crate_id/versions" sort order
1 parent 89a7113 commit a464fbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mirage/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default function() {
8282

8383
this.get('/crates/:crate_id/versions', (schema, request) => {
8484
let crate = request.params.crate_id;
85-
return schema.versions.where({ crate });
85+
return schema.versions.where({ crate }).sort((a, b) => compareIsoDates(b.created_at, a.created_at));
8686
});
8787

8888
this.get('/crates/:crate_id/:version_num/authors', (schema, request) => {

0 commit comments

Comments
 (0)