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';
|
import { AppService } from './app.service';
|
||||||
@Controller()
|
@Controller()
|
||||||
export class AppController {
|
export class AppController {
|
||||||
constructor(private readonly appService: AppService) {}
|
constructor(private readonly appService: AppService) { }
|
||||||
// #==== API Users
|
// #==== API Users
|
||||||
@Post('user/createAdminSystem')
|
@Post('user/createAdminSystem')
|
||||||
createAdminSystem(
|
createAdminSystem(
|
||||||
|
@ -33,7 +33,7 @@ export class AppController {
|
||||||
@Body('community_id') community_id: string,
|
@Body('community_id') community_id: string,
|
||||||
) {
|
) {
|
||||||
return this.appService.createGuard(dni, name, last_name, email, phone,
|
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')
|
@Post('user/createAdminCommunity')
|
||||||
|
@ -47,10 +47,10 @@ export class AppController {
|
||||||
@Body('user_type') user_type: string,
|
@Body('user_type') user_type: string,
|
||||||
@Body('status') status: string,
|
@Body('status') status: string,
|
||||||
@Body('date_entry') date_entry: Date,
|
@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,
|
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')
|
@Post('user/createUser')
|
||||||
|
@ -428,6 +428,11 @@ export class AppController {
|
||||||
return this.appService.findPost(paramPost);
|
return this.appService.findPost(paramPost);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Delete('post/deletePost/:id')
|
||||||
|
deletePost(@Param('id') id: string) {
|
||||||
|
return this.appService.deletePost(id);
|
||||||
|
}
|
||||||
|
|
||||||
// #==== API Comment
|
// #==== API Comment
|
||||||
|
|
||||||
@Post('post/createComment')
|
@Post('post/createComment')
|
||||||
|
|
Loading…
Reference in New Issue