Skip to content

Commit

Permalink
fix: add createdAt sort option (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: Yana Sidarava <[email protected]>
  • Loading branch information
yana617 and Yana Sidarava authored Aug 2, 2024
1 parent d51a73c commit ae24206
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion documentation/paths/users.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ get:
required: false
schema:
type: string
enum: [name, surname, phone]
enum: [name, surname, phone, createdAt]
- name: limit
in: query
description: count of users to return
Expand Down
2 changes: 1 addition & 1 deletion src/database/constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const permissionsForbiddenToBeAdditional = [

const DEFAULT_ROLE = 'USER';
const DEFAULT_LIMIT = 15;
const availableSortByNames = ['name', 'surname', 'phone'];
const availableSortByNames = ['name', 'surname', 'phone', 'createdAt'];
const availableOrder = ['asc', 'desc'];

export {
Expand Down

0 comments on commit ae24206

Please sign in to comment.