Browse Source

chore(api): sort api keys by properly

legacy-ui
isra el 1 year ago
parent
commit
efb3c03c5c
  1. 4
      api/src/auth/auth.service.ts

4
api/src/auth/auth.service.ts

@ -213,7 +213,9 @@ export class AuthService {
}
async getUserApiKeys(currentUser: User) {
return this.apiKeyModel.find({ user: currentUser._id })
return this.apiKeyModel.find({ user: currentUser._id }, null, {
sort: { createdAt: -1 },
})
}
async findApiKey(params) {

Loading…
Cancel
Save