Fix spelling
Some checks failed
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Test / docker (push) Has been cancelled
Runs E2E API Tests / build (20.x) (push) Has been cancelled
Lint & build / lint_and_build (20.x) (push) Has been cancelled
Lint & build / lint_and_build (22.x) (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
Mirror main branch to main-mirror-for-wdb / lint_and_build (push) Has been cancelled
Publish Docs / run (push) Has been cancelled

This commit is contained in:
Konstantin Wohlwend 2025-01-22 22:06:30 -08:00
parent 77cce58f92
commit 3d6cf7314c

View File

@ -107,7 +107,7 @@ export function ApiKeyTable(props: { apiKeys: ApiKey[] }) {
...apiKey,
status: ({ 'valid': 'valid', 'manually-revoked': 'revoked', 'expired': 'expired' } as const)[apiKey.whyInvalid() || 'valid'],
} satisfies ExtendedApiKey));
// first soft based on status, then by createdAt
// first sort based on status, then by createdAt
return keys.sort((a, b) => {
if (a.status === b.status) {
return a.createdAt < b.createdAt ? 1 : -1;