Add promotional endpoint (extended) for new users
This commit is contained in:
@@ -82,7 +82,16 @@ DB.getDB.then((DB) => {
|
||||
let organicPosts = await DB.getFeed(profileid);
|
||||
//Add non-organic posts
|
||||
const nonOrganicPosts = await generateNonOrganicPosts(req, profileid);
|
||||
const posts = mergePosts(organicPosts, nonOrganicPosts);
|
||||
const posts = mergePosts(promotionalPosts, nonOrganicPosts);
|
||||
return res.json(posts);
|
||||
});
|
||||
|
||||
router.get("/extended", async (req, res) => {
|
||||
const profileid = getProfileId(req);
|
||||
//Add non-organic posts
|
||||
const nonOrganicPosts = await generateNonOrganicPosts(req, profileid);
|
||||
let promotionalPosts = await DB.getPromotionalPosts(profileid);
|
||||
const posts = mergePosts(promotionalPosts, nonOrganicPosts);
|
||||
return res.json(posts);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user