change response for shared.ops.sleep, save user in POST /user/sleep and add integration tests for it

This commit is contained in:
Matteo Pagliazzi
2016-03-15 17:05:07 +01:00
parent 490c6a9ae1
commit b2b4340ee3
4 changed files with 38 additions and 10 deletions

View File

@@ -1,4 +1,8 @@
module.exports = function sleep (user) {
user.preferences.sleep = !user.preferences.sleep;
return user.preferences.sleep;
return {
preferences: {
sleep: user.preferences.sleep,
},
};
};