mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-10-02 07:08:23 -05:00
feat: add token and pid indexes to token models
This commit is contained in:
@@ -39,5 +39,7 @@ const IndependentServiceTokenSchema = new Schema<IIndependentServiceToken, Indep
|
||||
});
|
||||
|
||||
IndependentServiceTokenSchema.index({ 'info.expires': 1 }, { expireAfterSeconds: 0 });
|
||||
IndependentServiceTokenSchema.index({ token: 1 });
|
||||
IndependentServiceTokenSchema.index({ pid: 1 });
|
||||
|
||||
export const IndependentServiceToken = model<IIndependentServiceToken, IndependentServiceTokenModel>('IndependentServiceToken', IndependentServiceTokenSchema);
|
||||
|
||||
@@ -37,5 +37,7 @@ const NEXTokenSchema = new Schema<INEXToken, NEXTokenModel, INEXTokenMethods>({
|
||||
});
|
||||
|
||||
NEXTokenSchema.index({ 'info.expires': 1 }, { expireAfterSeconds: 0 });
|
||||
NEXTokenSchema.index({ token: 1 });
|
||||
NEXTokenSchema.index({ pid: 1 });
|
||||
|
||||
export const NEXToken = model<INEXToken, NEXTokenModel>('NEXToken', NEXTokenSchema);
|
||||
|
||||
@@ -39,5 +39,7 @@ const OAuthTokenSchema = new Schema<IOAuthToken, OAuthTokenModel, IOAuthTokenMet
|
||||
});
|
||||
|
||||
OAuthTokenSchema.index({ 'info.expires': 1 }, { expireAfterSeconds: 0 });
|
||||
OAuthTokenSchema.index({ token: 1 });
|
||||
OAuthTokenSchema.index({ pid: 1 });
|
||||
|
||||
export const OAuthToken = model<IOAuthToken, OAuthTokenModel>('OAuthToken', OAuthTokenSchema);
|
||||
|
||||
@@ -35,5 +35,7 @@ const PasswordResetTokenSchema = new Schema<IPasswordResetToken, PasswordResetTo
|
||||
});
|
||||
|
||||
PasswordResetTokenSchema.index({ 'info.expires': 1 }, { expireAfterSeconds: 0 });
|
||||
PasswordResetTokenSchema.index({ token: 1 });
|
||||
PasswordResetTokenSchema.index({ pid: 1 });
|
||||
|
||||
export const PasswordResetToken = model<IPasswordResetToken, PasswordResetTokenModel>('PasswordResetToken', PasswordResetTokenSchema);
|
||||
|
||||
Reference in New Issue
Block a user