]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/oauth/oauth-client.ts
Fix video job error when video has been deleted
[github/Chocobozzz/PeerTube.git] / server / models / oauth / oauth-client.ts
index 8dbc1c2f517b0e3fba1f7516bc98ad285498176e..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 {
+export class OAuthClientModel extends Model<Partial<AttributesOnly<OAuthClientModel>>> {
 
   @AllowNull(false)
   @Column
@@ -52,8 +53,8 @@ export class OAuthClientModel extends Model {
   static getByIdAndSecret (clientId: string, clientSecret: string) {
     const query = {
       where: {
-        clientId: clientId,
-        clientSecret: clientSecret
+        clientId,
+        clientSecret
       }
     }