Skip to content

Commit

Permalink
Merge pull request #388 from kaogeek/dev-shiorin
Browse files Browse the repository at this point in the history
 [API] เมื่ออนุมัติโพสเติมเต็ม แล้วจำนวน repost ไม่ขึ้น #382
  • Loading branch information
chaluckabs authored Dec 9, 2021
2 parents cccacbb + c5e95d3 commit 5f16184
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions api-spanboon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
"graphql": "15.4.0",
"helmet": "^4.2.0",
"imagemagick": "^0.1.3",
"jsdom": "^17.0.0",
"jsonfile": "6.1.0",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.21",
Expand Down
4 changes: 4 additions & 0 deletions api-spanboon/src/api/processors/UserFollowSectionProcessor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { S3Service } from '../services/S3Service';
import { ObjectID } from 'mongodb';
import moment from 'moment';
import { PLATFORM_NAME_TH } from '../../constants/SystemConfig';
import { POST_TYPE } from '../../constants/PostType';

export class UserFollowSectionProcessor extends AbstractSectionModelProcessor {

Expand Down Expand Up @@ -131,6 +132,9 @@ export class UserFollowSectionProcessor extends AbstractSectionModelProcessor {
lastestFilter.whereConditions.deleted = false;
lastestFilter.whereConditions.hidden = false;
lastestFilter.whereConditions.startDateTime = { $lte: today };
lastestFilter.whereConditions.type= {
$nin: [POST_TYPE.FULFILLMENT]
}; // remove fulfillment post type comment this for showing all post type.

// overide start datetime
const dateTimeAndArray = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import moment from 'moment';
import { PLATFORM_NAME_TH } from '../../constants/SystemConfig';
import { ObjectID } from 'mongodb';
import { S3Service } from '../services/S3Service';
import { POST_TYPE } from '../../constants/PostType';

export class UserRecommendSectionProcessor extends AbstractSectionModelProcessor {

Expand Down Expand Up @@ -90,8 +91,11 @@ export class UserRecommendSectionProcessor extends AbstractSectionModelProcessor
const matchStmt: any = {
isDraft: false,
deleted: false,
hidden: false
};
hidden: false,
type: {
$nin: [POST_TYPE.FULFILLMENT] // remove fulfillment post type comment this for showing all post type.
}
};
if (userId !== undefined && userId !== '') {
// ! impl
} else if (clientId !== undefined) {
Expand Down

0 comments on commit 5f16184

Please sign in to comment.