async function getById(req, res, next) {
  try {
    const promise = await Promise.all([
      User.findById(req.user._id),
      Post.findById(req.params.id).populate('author'),
    ]);
    const favorite = promise[0]._favorites.isPostIsFavorite(req.params.id);
    return res.status(HTTPStatus.OK).json({
      ...promise[1].toJSON(),
      favorite,
    });
  } catch (err) {
    err.status = HTTPStatus.BAD_REQUEST;
    return next(err);
  }
}
@api {get} /posts/:id Get a single post
@apiDescription Get a single post
@apiName getPost
@apiGroup Post

@apiHeader {Authorization} Authorization JWT Token

@apiSuccess {Number} status Status of the Request.
@apiSuccess {Object} post Post created.
@apiSuccess {String} post._id Post _id.
@apiSuccess {String} post.title Post title.
@apiSuccess {String} post.text Post text.
@apiSuccess {Object} post.author Post author.
@apiSuccess {String} post.author._id Author id.
@apiSuccess {String} post.author.username Author username.
@apiSuccess {String} post.createdAt Post created date.
@apiSuccess {Boolean} favorite User have favorite post

@apiParam (Login) {String} pass Only logged in users can do this.

@apiHeaderExample {json} Header-Example:
{
 "AUTHORIZATION": "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1OTBhMWI3ODAzMDI3N2NiNjQxM2JhZGUiLCJpYXQiOjE0OTM4MzQ2MTZ9.RSlMF6RRwAALZQRdfKrOZWnuHBk-mQNnRcCLJsc8zio"
}

@apiSuccessExample Success-Response:

HTTP/1.1 200 OK

{
 _id: '123',
 title: 'a title',
 text: 'a text',
 createdAt: '2017-05-03',
 author: {
   _id: '123312',
   username: 'Jon'
 },
 favorite: true
}

@apiErrorExample {json} Post not found
   HTTP/1.1 404 Not Found
@apiErrorExample {json} Unauthorized
   HTTP/1.1 401 Unauthorized