]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/oauth/oauth-client.ts
Add expect message to ease debug
[github/Chocobozzz/PeerTube.git] / server / models / oauth / oauth-client.ts
index 42c59bb7923431c263f44e947c3519509b9365d3..457e846137f94a79f8a8dad70ae3c6e6e7e46a10 100644 (file)
@@ -1,4 +1,5 @@
 import { AllowNull, Column, CreatedAt, DataType, HasMany, Model, Table, UpdatedAt } from 'sequelize-typescript'
+import { AttributesOnly } from '@shared/typescript-utils'
 import { OAuthTokenModel } from './oauth-token'
 
 @Table({
@@ -14,7 +15,7 @@ import { OAuthTokenModel } from './oauth-token'
     }
   ]
 })
-export class OAuthClientModel extends Model<OAuthClientModel> {
+export class OAuthClientModel extends Model<Partial<AttributesOnly<OAuthClientModel>>> {
 
   @AllowNull(false)
   @Column
@@ -52,8 +53,8 @@ export class OAuthClientModel extends Model<OAuthClientModel> {
   static getByIdAndSecret (clientId: string, clientSecret: string) {
     const query = {
       where: {
-        clientId: clientId,
-        clientSecret: clientSecret
+        clientId,
+        clientSecret
       }
     }