This repository was archived by the owner on Jul 29, 2026. It is now read-only.
Description
Item
Version
generator-angular-fullstack
4.1.1
Node
4.4.4
npm
3.10.5
Operating System Ubuntu 16.10
Item
Answer
Transpiler
TypeScript
Markup
HTML
CSS
SCSS
Router
ui-router
Client Tests
Mocha
DB
MongoDB
Auth
Y
Missing return in thing.controller.js at line 43:
WHICH causes
Warning: a promise was created in a handler at angular-fullstack/server/api/thing/thing.controller.js:43:27 but was not returned from it,
Change:
function removeEntity(res) {
return function(entity) {
if(entity) {
return entity.remove()
.then(() => {
res.status(204).end();
});
}
};
}
to:
function removeEntity(res) {
return function(entity) {
if(entity) {
return entity.remove()
.then(() => {
------> return res.status(204).end();
});
}
};
}
The fix above is better changed too below, because otherwise the eslint: arrow-body-style rule is triggered.
to:
function removeEntity(res) {
return function(entity) {
if(entity) {
return entity.remove()
.then(() => {
res.status(204).end();
------> return null;
});
}
};
}
Reactions are currently unavailable
Missing return in thing.controller.js at line 43:
WHICH causes
Warning: a promise was created in a handler at angular-fullstack/server/api/thing/thing.controller.js:43:27 but was not returned from it,Change:
to:
The fix above is better changed too below, because otherwise the eslint: arrow-body-style rule is triggered.
to: