diff --git a/api/src/auth/auth.service.ts b/api/src/auth/auth.service.ts index 6a4756b..dad46c2 100644 --- a/api/src/auth/auth.service.ts +++ b/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) {