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

50 lines
1.7 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-05-23 17:32:44 +05:30
import { InsertSPContactsDTO, UpdateSPContactsDTO } from 'src/dto/sp-contacts/sp-contacts.dto';
2025-05-26 17:27:36 +05:30
import { SP_CONTACTID_DTO } from 'src/dto/contact/contact-property.dto';
import { SPID_DTO } from 'src/dto/sp/sp-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-05-26 17:27:36 +05:30
@ApiTags('SPContacts - Mssql')
@Put('/UpdateSPContacts')
updateSPContacts(@Body() body: UpdateSPContactsDTO) {
return this.spContactsService.updateSPContacts(body);
}
2025-04-08 12:47:55 +05:30
}