Skip to content

Commit

Permalink
#350 (Urgent) [UI] - แก้ไขโพสต์ไม่ได้
Browse files Browse the repository at this point in the history
  • Loading branch information
junsudas committed Sep 29, 2021
1 parent 9526a8d commit c191dd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api-spanboon/src/api/controllers/PagePostController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export class PagePostController {
pageData = await this.pageService.find({ where: { pageId: null, ownerUser: userObjId } });
} else {
pageObjId = new ObjectID(pageId);
pageData = await this.pageService.find({ where: { _id: pageObjId, ownerUser: userObjId } });
pageData = await this.pageService.find({ where: { _id: pageObjId } });

if (pageData === undefined) {
return res.status(400).send(ResponseUtil.getErrorResponse('Page was not found.', undefined));
Expand Down Expand Up @@ -1437,7 +1437,7 @@ export class PagePostController {
let isPageMode = false;
if (pageId !== undefined && pageId !== '' && pageId !== 'null' && pageId !== null && pageId !== 'undefined') {
pageObjId = new ObjectID(pageId);
pageData = await this.pageService.findOne({ _id: pageObjId, ownerUser });
pageData = await this.pageService.findOne({ _id: pageObjId });
isPageMode = true;

if (pageData === undefined) {
Expand Down

0 comments on commit c191dd7

Please sign in to comment.