53 lines
1.6 KiB
TypeScript
53 lines
1.6 KiB
TypeScript
import { Body, Controller, Get, Post, Put, Query } from '@nestjs/common';
|
|
import { SpContactsService } from './sp-contacts.service';
|
|
import { ApiTags } from '@nestjs/swagger';
|
|
|
|
import {
|
|
SPID_DTO,
|
|
SP_CONTACTID_DTO,
|
|
InsertSPContactsDTO, UpdateSPContactsDTO
|
|
} from 'src/dto/property.dto';
|
|
|
|
@Controller('mssql')
|
|
export class SpContactsController {
|
|
|
|
constructor(private readonly spContactsService: SpContactsService) { }
|
|
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Post('/InactivateSPContact')
|
|
inactivateSPContact(@Query() body: SP_CONTACTID_DTO) {
|
|
return this.spContactsService.inactivateSPContact(body);
|
|
}
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Get('/GetSPDefaultContact')
|
|
getSPDefaultcontact(@Query() body: SPID_DTO) {
|
|
return this.spContactsService.getSPDefaultcontacts(body);
|
|
}
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Get('/GetSPAllContacts')
|
|
getSPAllContacts(@Query() body: SPID_DTO) {
|
|
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: SP_CONTACTID_DTO) {
|
|
return this.spContactsService.setSPDefaultcontact(body);
|
|
}
|
|
|
|
@ApiTags('SPContacts - Mssql')
|
|
@Put('/UpdateSPContacts')
|
|
updateSPContacts(@Body() body: UpdateSPContactsDTO) {
|
|
return this.spContactsService.updateSPContacts(body);
|
|
}
|
|
}
|