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

@Injectable()
export class OAuthCreateAuthorizationCodeService {
  constructor(private readonly repository: OAuthSequelizeAuthorizationCodeRepository) {}

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