X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Foauth%2Foauth-client.ts;h=457e846137f94a79f8a8dad70ae3c6e6e7e46a10;hb=ba2684ceddf9b76312635b9cddc6bf6975ce436a;hp=42c59bb7923431c263f44e947c3519509b9365d3;hpb=3acc50844047a37698f0618fa235c138e386a053;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/oauth/oauth-client.ts b/server/models/oauth/oauth-client.ts index 42c59bb79..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 } }