This commit is contained in:
2026-03-10 11:58:24 +03:30
parent 4ead1cdaf6
commit ef2f4bf796
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ export class AdminService {
throw new NotFoundException('Admin not found');
}
const { roleId, ...rest } = dto;
const { ...rest } = dto;
// Update scalar fields (firstName, lastName, phone)
if (rest.firstName !== undefined) {
+4 -2
View File
@@ -1,13 +1,15 @@
import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { Controller, Get, Post, Body, Patch, Param, Delete, UseGuards } from '@nestjs/common';
import { BusinessService } from './business.service';
import { SetupBusinessDto } from './dto/create-business.dto';
import { UpdateBusinessDto } from './dto/update-business.dto';
import { SuperAdminAuthGuard } from '../auth/guards/superAdminAuth.guard';
@Controller('business')
export class BusinessController {
constructor(private readonly businessService: BusinessService) { }
@Post()
@Post('setup')
@UseGuards(SuperAdminAuthGuard)
create(@Body() createBusinessDto: SetupBusinessDto) {
return this.businessService.setupAccount(createBusinessDto);
}