Patch service account UI in audit logs, add lastUsed for API keys and service accounts/tokens

This commit is contained in:
Tuan Dang
2023-04-06 23:52:06 +03:00
parent d54753289a
commit a7880db871
10 changed files with 145 additions and 138 deletions
+4
View File
@@ -3,6 +3,7 @@ import { Schema, model, Types } from 'mongoose';
export interface IAPIKeyData {
name: string;
user: Types.ObjectId;
lastUsed: Date;
expiresAt: Date;
secretHash: string;
}
@@ -18,6 +19,9 @@ const apiKeyDataSchema = new Schema<IAPIKeyData>(
ref: 'User',
required: true
},
lastUsed: {
type: Date
},
expiresAt: {
type: Date
},