Skip to content

Commit

Permalink
remove fulfillment type from main page
Browse files Browse the repository at this point in the history
  • Loading branch information
junsudas committed Dec 9, 2021
1 parent 8997e53 commit a771c7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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 a771c7e

Please sign in to comment.