agregar manejo de DELETE the comunicados en controlador de API
This commit is contained in:
parent
6c6b944da7
commit
1fd25ee469
|
@ -2,7 +2,7 @@ import { Controller, Get, Post, Put, Body, Param, Delete } from '@nestjs/common'
|
|||
import { AppService } from './app.service';
|
||||
@Controller()
|
||||
export class AppController {
|
||||
constructor(private readonly appService: AppService) {}
|
||||
constructor(private readonly appService: AppService) { }
|
||||
// #==== API Users
|
||||
@Post('user/createAdminSystem')
|
||||
createAdminSystem(
|
||||
|
@ -16,7 +16,7 @@ export class AppController {
|
|||
@Body('date_entry') date_entry: Date,
|
||||
) {
|
||||
return this.appService.createAdminSystem(dni, name, last_name, email, phone,
|
||||
user_type, status, date_entry);
|
||||
user_type, status, date_entry);
|
||||
}
|
||||
|
||||
@Post('user/createGuard')
|
||||
|
@ -33,7 +33,7 @@ export class AppController {
|
|||
@Body('community_id') community_id: string,
|
||||
) {
|
||||
return this.appService.createGuard(dni, name, last_name, email, phone,
|
||||
user_type, status, date_entry,community_id);
|
||||
user_type, status, date_entry, community_id);
|
||||
}
|
||||
|
||||
@Post('user/createAdminCommunity')
|
||||
|
@ -47,10 +47,10 @@ export class AppController {
|
|||
@Body('user_type') user_type: string,
|
||||
@Body('status') status: string,
|
||||
@Body('date_entry') date_entry: Date,
|
||||
@Body('community_id') community_id:string
|
||||
@Body('community_id') community_id: string
|
||||
) {
|
||||
return this.appService.createAdminCommunity(dni, name, last_name, email, phone,
|
||||
user_type, status, date_entry,community_id);
|
||||
user_type, status, date_entry, community_id);
|
||||
}
|
||||
|
||||
@Post('user/createUser')
|
||||
|
@ -428,6 +428,11 @@ export class AppController {
|
|||
return this.appService.findPost(paramPost);
|
||||
}
|
||||
|
||||
@Delete('post/deletePost/:id')
|
||||
deletePost(@Param('id') id: string) {
|
||||
return this.appService.deletePost(id);
|
||||
}
|
||||
|
||||
// #==== API Comment
|
||||
|
||||
@Post('post/createComment')
|
||||
|
|
Loading…
Reference in New Issue