diff options
Diffstat (limited to 'hooks/sortByDate.ts')
-rw-r--r-- | hooks/sortByDate.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hooks/sortByDate.ts b/hooks/sortByDate.ts index 4a20920..9dd1222 100644 --- a/hooks/sortByDate.ts +++ b/hooks/sortByDate.ts @@ -2,7 +2,7 @@ import _ from 'lodash'; import { HookContext } from '@feathersjs/feathers'; export default async (context: HookContext): Promise<HookContext> => { - _.set(context, 'params.query.$sort', { createdAt: - 1}); + _.set(context, 'params.query.$sort', { createdAt: -1 }); return context; -} +}; |