transform core api codes into this project, update modules as admin/pos context modules
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||
import { CreatePartnerDto, UpdatePartnerDto } from './dto/partner.dto'
|
||||
import { PartnersService } from './partners.service'
|
||||
|
||||
@Controller('admin/partners')
|
||||
export class PartnersController {
|
||||
constructor(private readonly partnersService: PartnersService) {}
|
||||
|
||||
@Get()
|
||||
async findAll() {
|
||||
return this.partnersService.findAll()
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
async findOne(@Param('id') id: string) {
|
||||
return this.partnersService.findOne(id)
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() data: CreatePartnerDto) {
|
||||
return this.partnersService.create(data)
|
||||
}
|
||||
|
||||
@Put(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdatePartnerDto) {
|
||||
return this.partnersService.update(id, data)
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
async delete(@Param('id') id: string) {
|
||||
return this.partnersService.delete(id)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user