File

apps/recallassess/recallassess-api/src/api/client/company-profile/company-profile.controller.ts

Prefix

api/client/company-profile

Index

Methods

Methods

Async getCompanyProfile
getCompanyProfile(authData: CLAuthData)
Decorators :
@Get()

Get company profile GET /api/client/company-profile

Parameters :
Name Type Optional
authData CLAuthData No
Returns : Promise<CompanyProfileDto>
Async updateCompanyProfile
updateCompanyProfile(authData: CLAuthData, updateDto: UpdateCompanyProfileDto)
Decorators :
@Put()

Update company profile PUT /api/client/company-profile

Parameters :
Name Type Optional
authData CLAuthData No
updateDto UpdateCompanyProfileDto No
Returns : Promise<CompanyProfileDto>
import { Body, Controller, Get, Put } from "@nestjs/common";
import { CLAuthData, ClientAuth } from "../../shared/decorators/client-auth.decorator";
import { CLCompanyProfileService } from "./company-profile.service";
import { CompanyProfileDto, UpdateCompanyProfileDto } from "./dto";

@Controller("api/client/company-profile")
export class CLCompanyProfileController {
  constructor(private companyProfileService: CLCompanyProfileService) {}

  /**
   * Get company profile
   * GET /api/client/company-profile
   */
  @Get()
  async getCompanyProfile(@ClientAuth() authData: CLAuthData): Promise<CompanyProfileDto> {
    return this.companyProfileService.getCompanyProfile(authData.companyId);
  }

  /**
   * Update company profile
   * PUT /api/client/company-profile
   */
  @Put()
  async updateCompanyProfile(
    @ClientAuth() authData: CLAuthData,
    @Body() updateDto: UpdateCompanyProfileDto,
  ): Promise<CompanyProfileDto> {
    return this.companyProfileService.updateCompanyProfile(authData.companyId, updateDto);
  }
}

results matching ""

    No results matching ""