X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Foauth%2Foauth-client.ts;h=457e846137f94a79f8a8dad70ae3c6e6e7e46a10;hb=52d6c2e0bf0893e39d0a89fccebad684e9d61ce5;hp=8dbc1c2f517b0e3fba1f7516bc98ad285498176e;hpb=b49f22d8f9a52ab75fd38db2d377249eb58fa678;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/oauth/oauth-client.ts b/server/models/oauth/oauth-client.ts index 8dbc1c2f5..457e84613 100644 --- a/server/models/oauth/oauth-client.ts +++ b/server/models/oauth/oauth-client.ts @@ -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>> { @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 } }