mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 10:12:21 +00:00
[#1709] fix to 'user is not defined' (for whomever is using this route, not
us. we need to clean up our api)
This commit is contained in:
parent
fbbcecc6e2
commit
57116d949a
1 changed files with 1 additions and 0 deletions
|
|
@ -147,6 +147,7 @@ api.scoreTask = function(req, res, next) {
|
|||
* Get all tasks
|
||||
*/
|
||||
api.getTasks = function(req, res, next) {
|
||||
var user = res.locals.user;
|
||||
if (req.query.type) {
|
||||
return res.json(user[req.query.type+'s']);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue