30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import { Body, Controller, Get, Post, Query } from '@nestjs/common';
|
|
import { SpContactsService } from './sp-contacts.service';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
import { getSPAllContactsDTO, getSPDefaultcontactDTO, inactivateSPContactDTO } 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);
|
|
}
|
|
}
|