Skip to content

Commit 9623321

Browse files
committed
server/types/apiKey: add token? to apiKey
1 parent fda6632 commit 9623321

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/types/apiKey.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export interface IApiKey extends VirtualId, MongooseTimestamps {
88
label: string;
99
lastUsedAt?: Date;
1010
hashedKey: string;
11+
token?: string;
1112
}
1213

1314
/** Mongoose document object for API Key */
@@ -23,7 +24,10 @@ export interface ApiKeyDocument
2324
* and can be exposed to the client
2425
*/
2526
export interface SanitisedApiKey
26-
extends Pick<ApiKeyDocument, 'id' | 'label' | 'lastUsedAt' | 'createdAt'> {}
27+
extends Pick<
28+
ApiKeyDocument,
29+
'id' | 'label' | 'lastUsedAt' | 'createdAt' | 'token'
30+
> {}
2731

2832
/** Mongoose model for API Key */
2933
export interface ApiKeyModel extends Model<ApiKeyDocument> {}

0 commit comments

Comments
 (0)