BE/src/mssql/uscib-managed-sp/sp-contacts/sp-contacts.controller.ts

53 lines
1.6 KiB
TypeScript
Raw Normal View History

2025-04-09 11:01:35 +05:30
import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common';
2025-04-08 12:47:55 +05:30
import { SpContactsService } from './sp-contacts.service';
import { ApiTags } from '@nestjs/swagger';
2025-06-04 17:20:45 +05:30
import {
SPID_DTO,
SP_CONTACTID_DTO,
InsertSPContactsDTO, UpdateSPContactsDTO
} from 'src/dto/property.dto';
2025-04-08 12:47:55 +05:30
@Controller('mssql')
export class SpContactsController {
constructor(private readonly spContactsService: SpContactsService) { }
@ApiTags('SPContacts - Mssql')
@Post('/InactivateSPContact')
inactivateSPContact(@Query() body: SP_CONTACTID_DTO) {
2025-04-08 12:47:55 +05:30
return this.spContactsService.inactivateSPContact(body);
}
@ApiTags('SPContacts - Mssql')
@Get('/GetSPDefaultContact')
2025-05-26 17:27:36 +05:30
getSPDefaultcontact(@Query() body: SPID_DTO) {
2025-04-08 12:47:55 +05:30
return this.spContactsService.getSPDefaultcontacts(body);
}
@ApiTags('SPContacts - Mssql')
@Get('/GetSPAllContacts')
2025-05-26 17:27:36 +05:30
getSPAllContacts(@Query() body: SPID_DTO) {
2025-04-08 12:47:55 +05:30
return this.spContactsService.getSpAllContacts(body);
}
2025-04-09 11:01:35 +05:30
2025-04-09 11:03:56 +05:30
@ApiTags('SPContacts - Mssql')
2025-04-09 11:01:35 +05:30
@Post('/InsertSPContacts')
insertSPContacts(@Body() body: InsertSPContactsDTO) {
return this.spContactsService.insertSPContacts(body);
}
2025-04-09 11:03:56 +05:30
@ApiTags('SPContacts - Mssql')
2025-04-09 11:01:35 +05:30
@Post('/SetSPDefaultContact')
setSPDefaultcontact(@Query() body: SP_CONTACTID_DTO) {
2025-04-09 11:01:35 +05:30
return this.spContactsService.setSPDefaultcontact(body);
}
2025-06-04 17:20:45 +05:30
@ApiTags('SPContacts - Mssql')
@Put('/UpdateSPContacts')
updateSPContacts(@Body() body: UpdateSPContactsDTO) {
return this.spContactsService.updateSPContacts(body);
}
2025-04-08 12:47:55 +05:30
}