Skip to content

Commit

Permalink
fix response format
Browse files Browse the repository at this point in the history
  • Loading branch information
OvieMudi committed Sep 7, 2019
1 parent 7ef6bd0 commit 0941eb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/controllers/novelController.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ const getAuthorStats = async (request, response) => {
try {
const novelsInfo = await getNovelStats(request.params.userId);

return responseMessage(response, 200, { data: novelsInfo });
return responseMessage(response, 200, { novels: novelsInfo });
} catch (error) {
log(error.message);
return responseMessage(response, 500, { error: 'an error occurred' });
Expand Down

0 comments on commit 0941eb2

Please sign in to comment.