/**
 * @aurora-catalyst-generated
 * @source cliter/iam/account.aurora.yaml
 */
import { IamAccount } from '@api/graphql';
import { IamMeAccountHandler } from '@app/iam/account';
import { Auth } from '@aurora/decorators';
import { CurrentAccount } from '@aurorajs.dev/core-back';
import { Query, Resolver } from '@nestjs/graphql';

@Resolver()
@Auth()
export class IamMeAccountResolver {
  constructor(private readonly handler: IamMeAccountHandler) {}

  @Query('iamMeAccount')
  async main(@CurrentAccount() currentAccount: IamAccount): Promise<IamAccount> {
    return await this.handler.main(currentAccount);
  }
}
