File

apps/recallassess/recallassess-api/src/api/client/account/account.controller.ts

Prefix

api/client/account

Description

CLAccountController

Client portal API — Account (Account). HTTP Endpoints for RecallAssess.

Index

Methods

Methods

Async createAccountFromSignup
createAccountFromSignup(dto: CreateAccountFromSignupDto)
Decorators :
@Public()
@Post('create-from-signup')
@ApiOperation({summary: 'Create company + admin from signup', description: 'Creates the company tenant and admin participant after Stripe payment or trial setup. Optional team_size is stored on company.'})
@ApiBody({type: CreateAccountFromSignupDto})
@ApiResponse({status: 201, description: 'Account created', type: AccountCreationResponseDto})

Create company account and admin user after signup/payment. Called by frontend after successful payment. Public (no auth). Persists optional team_size onto company.team_size.

Parameters :
Name Type Optional
dto CreateAccountFromSignupDto No
import { Public } from "@bish-nest/bnest-auth";
import { Body, Controller, Post } from "@nestjs/common";
import { ApiBody, ApiOperation, ApiResponse, ApiTags } from "@nestjs/swagger";
import { CLAccountService } from "./account.service";
import { AccountCreationResponseDto, CreateAccountFromSignupDto } from "./dto/account.dto";

/**
 * CLAccountController
 *
 * Client portal API — Account (Account). HTTP Endpoints for RecallAssess.
 */


@ApiTags("Client - Account")
@Controller("api/client/account")
export class CLAccountController {
  constructor(private accountService: CLAccountService) {}

  /**
   * Create company account and admin user after signup/payment.
   * Called by frontend after successful payment. Public (no auth).
   * Persists optional `team_size` onto `company.team_size`.
   */
  @Public()
  @Post("create-from-signup")
  @ApiOperation({
    summary: "Create company + admin from signup",
    description:
      "Creates the company tenant and admin participant after Stripe payment or trial setup. Optional team_size is stored on company.",
  })
  @ApiBody({ type: CreateAccountFromSignupDto })
  @ApiResponse({ status: 201, description: "Account created", type: AccountCreationResponseDto })
  async createAccountFromSignup(@Body() dto: CreateAccountFromSignupDto): Promise<AccountCreationResponseDto> {
    return this.accountService.createAccountFromSignup(dto);
  }
}

results matching ""

    No results matching ""