Skip to content

Commit

Permalink
Fixed lint errors
Browse files Browse the repository at this point in the history
Fixed lint errors.
  • Loading branch information
liutng committed Nov 17, 2022
1 parent 90a16c0 commit 2063844
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/api/posts/src/routes/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ posts.get('/', validatePostsQuery(), async (req, res, next) => {
const defaultNumberOfPosts = process.env.MAX_POSTS_PER_PAGE || 30;
const capNumOfPosts = 100;
const page = parseInt(req.query.page || 1, 10);
const expand = req.query.expand ? parseInt(req.query.expand) : 0;
const expand = req.query.expand ? parseInt(req.query.expand, 10) : 0;
let ids;
let perPage;
let postsCount;
Expand Down Expand Up @@ -64,7 +64,8 @@ posts.get('/', validatePostsQuery(), async (req, res, next) => {
if (expand === 1) {
data = await Promise.all(
ids.map(async (id) => {
let post = await Post.byId(id); //obtain the corresponding feed to populate the author's name to the return data.
// obtain the corresponding feed to populate the author's name to the return data.
const post = await Post.byId(id);
return {
id,
url: `${postsUrl}/${id}`,
Expand Down

0 comments on commit 2063844

Please sign in to comment.