api change status

This commit is contained in:
Mariela 2022-08-19 00:19:15 -06:00
parent bf2c9b374a
commit e1bcdd3995
2 changed files with 19 additions and 0 deletions

View File

@ -215,6 +215,8 @@ export class AppController {
) {
return this.appService.changeStatusCommunity(pId, pStatus);
}
// #==== API Common Areas
@Post('commonArea/createCommonArea')
createCommonArea(
@ -254,6 +256,14 @@ export class AppController {
return this.appService.deleteCommonArea(id);
}
@Post('commonArea/changeStatus')
changeStatusCommonArea(
@Body('id') pId: string,
@Body('status') pStatus: string,
) {
return this.appService.changeStatusCommonArea(pId, pStatus);
}
// #==== API GUEST
//#API userService - create user
@Post('guest/createGuest')

View File

@ -343,6 +343,15 @@ export class AppService {
.pipe(map((message: string) => ({ message })));
}
changeStatusCommonArea(pId: string, pStatus: string) {
const pattern = { cmd: 'changeStatus' };
const payload = { id: pId, status: pStatus };
return this.clientCommonAreaApp
.send<string>(pattern, payload)
.pipe(map((message: string) => ({ message })));
}
// ====================== GUESTS ===============================
//POST parameter from API