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

@Injectable()
export class OAuthCreateRefreshTokenService {
  constructor(private readonly repository: OAuthSequelizeRefreshTokenRepository) {}

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