Skip to content

Commit a84ff90

Browse files
committed
fix(server): fix some bluebird warnings
fixes #2412, #2363
1 parent c638fb6 commit a84ff90

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Diff for: templates/app/server/api/user(auth)/user.controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export function me(req, res, next) {
146146
if (!user) {
147147
return res.status(401).end();
148148
}
149-
res.json(user);
149+
return res.json(user);
150150
})
151151
.catch(err => next(err));
152152
}

Diff for: templates/app/server/auth(auth)/auth.service.js

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export function isAuthenticated() {
4242
}
4343
req.user = user;
4444
next();
45+
return null;
4546
})
4647
.catch(err => next(err));
4748
});

Diff for: templates/endpoint/basename.controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function removeEntity(res) {
4242
<% if(filters.mongooseModels) { %>return entity.remove()<% }
4343
if(filters.sequelizeModels) { %>return entity.destroy()<% } %>
4444
.then(() => {
45-
res.status(204).end();
45+
return res.status(204).end();
4646
});
4747
}
4848
};

0 commit comments

Comments
 (0)