Răsfoiți Sursa

scope -> scopes

Shun Miyazawa 1 an în urmă
părinte
comite
565d06fd10
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      apps/app/src/server/models/access-token.ts

+ 1 - 1
apps/app/src/server/models/access-token.ts

@@ -119,7 +119,7 @@ accessTokenSchema.statics.findUserIdByToken = async function(token: string, requ
 
 accessTokenSchema.statics.findTokenByUserId = async function(userId: Types.ObjectId | string) {
   const now = getNowDate();
-  return this.find({ user: userId, expiredAt: { $gte: now } }).select('_id expiredAt scope description');
+  return this.find({ user: userId, expiredAt: { $gte: now } }).select('_id expiredAt scopes description');
 };
 
 accessTokenSchema.statics.validateTokenScopes = async function(token: string, requiredScopes: Scope[]) {