/**
 * @aurora-catalyst-generated
 * @source cliter/o-auth/credential.aurora.yaml
 */
import { OAuthSequelizeCredentialRepository } from '@app/o-auth/credential';
import { HandlerMeta } from '@aurorajs.dev/core-back';
import { Injectable } from '@nestjs/common';

@Injectable()
export class OAuthCreateCredentialService {
  constructor(private readonly repository: OAuthSequelizeCredentialRepository) {}

  async main(payload: any, handlerMeta?: HandlerMeta): Promise<void> {
    await this.repository.create(payload, {
      createOptions: handlerMeta?.repositoryOptions,
    });
  }
}
