[API] Fix bugs

This commit is contained in:
syuilo
2017-02-16 14:34:11 +09:00
parent a875f1182c
commit 9f02d2d1b8
6 changed files with 6 additions and 14 deletions

View File

@ -19,14 +19,12 @@ module.exports = (params, user) =>
new Promise(async (res, rej) =>
{
// Get 'following' parameter
const following = params.following === 'true';
const following = params.following;
// Get 'mark_as_read' parameter
let markAsRead = params.mark_as_read;
if (markAsRead == null) {
markAsRead = true;
} else {
markAsRead = markAsRead === 'true';
}
// Get 'type' parameter