48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common';
|
|
import { SpContactsService } from './sp-contacts.service';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
import { getSPAllContactsDTO, getSPDefaultcontactDTO, inactivateSPContactDTO, InsertSPContactsDTO, setSPDefaultcontactDTO, UpdateSPContactsDTO } from 'src/oracle/uscib-managed-sp/sp-contacts/sp-contacts.dto';
|
|
|
|
@Controller('mssql')
|
|
export class SpContactsController {
|
|
|
|
constructor(private readonly spContactsService: SpContactsService) { }
|
|
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Post('/InactivateSPContact')
|
|
inactivateSPContact(@Query() body: inactivateSPContactDTO) {
|
|
return this.spContactsService.inactivateSPContact(body);
|
|
}
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Get('/GetSPDefaultContact')
|
|
getSPDefaultcontact(@Query() body: getSPDefaultcontactDTO) {
|
|
return this.spContactsService.getSPDefaultcontacts(body);
|
|
}
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Get('/GetSPAllContacts')
|
|
getSPAllContacts(@Query() body: getSPAllContactsDTO) {
|
|
return this.spContactsService.getSpAllContacts(body);
|
|
}
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Post('/InsertSPContacts')
|
|
insertSPContacts(@Body() body: InsertSPContactsDTO) {
|
|
return this.spContactsService.insertSPContacts(body);
|
|
}
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Post('/SetSPDefaultContact')
|
|
setSPDefaultcontact(@Query() body: setSPDefaultcontactDTO) {
|
|
return this.spContactsService.setSPDefaultcontact(body);
|
|
}
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Put('/UpdateSPContacts')
|
|
updateSPContacts(@Body() body: UpdateSPContactsDTO) {
|
|
return this.spContactsService.updateSPContacts(body);
|
|
}
|
|
}
|