Skip to content

fix: Missing where or truncate attribute in the options parameter of model.destroy #1989

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Overview
├── client
│   ├── app - All of our app specific components go in here
│   ├── assets - Custom assets: fonts, images, etc…
│   ├── components - Our reusable components, non-specific to to our app
│   ├── components - Our reusable components, non-specific to our app
├── e2e - Our protractor end to end tests
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"grunt-david": "~0.7.0",
"grunt-env": "^0.4.1",
"grunt-mocha-test": "^0.12.7",
"grunt-release": "^0.13.0",
"grunt-release": "^0.14.0",
"gulp": "^3.9.1",
"gulp-if": "^2.0.1",
"gulp-mocha": "^2.2.0",
Expand All @@ -76,13 +76,13 @@
"jscs": "^3.0.3",
"lazypipe": "^1.0.1",
"merge-stream": "^1.0.0",
"minimatch": "^3.0.0",
"minimatch": "^3.0.2",
"mocha": "^2.5.2",
"q": "^1.0.1",
"recursive-readdir": "^2.0.0",
"run-sequence": "^1.2.1",
"shelljs": "^0.7.0",
"should": "^9.0.0",
"should": "^9.0.2",
"yeoman-assert": "^2.0.0",
"yeoman-test": "~1.4.0"
},
Expand Down
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Install `yo`, `grunt-cli`/`gulp-cli`, `bower`, and `generator-angular-fullstack`
npm install -g yo grunt-cli gulp-cli bower generator-angular-fullstack
```

> To install the latest 4.0.0 Beta with Webpack support, use `generator-angular-fullstack@webpack`

Make a new directory, and `cd` into it:
```
mkdir my-new-project && cd $_
Expand All @@ -40,7 +42,7 @@ Run `grunt`/`gulp build` for building, `grunt serve`/`gulp serve` for developmen

**General**

* Build Systems: `Grunt`, `Gulp`
* Build Systems: `Grunt` (deprecated, will be removed in 4.0.0), `Gulp`
* Testing:
* `Jasmine`
* `Mocha + Chai + Sinon`
Expand Down
9 changes: 6 additions & 3 deletions src/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,12 @@ export class Generator extends Base {
type: 'list',
name: 'buildtool',
message: 'Would you like to use Gulp or Grunt?',
choices: ['Grunt', 'Gulp'],
default: 1,
filter: val => val.toLowerCase()
choices: ['Gulp', 'Grunt (deprecated)'],
default: 0,
filter: val => ({
'Gulp': 'gulp',
'Grunt (deprecated)': 'grunt'
})[val]
}, {
type: 'list',
name: 'testing',
Expand Down
2 changes: 1 addition & 1 deletion templates/app/server/api/user(auth)/user.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export function show(req, res, next) {
*/
export function destroy(req, res) {
<% if (filters.mongooseModels) { %>return User.findByIdAndRemove(req.params.id).exec()<% }
if (filters.sequelizeModels) { %>return User.destroy({ _id: req.params.id })<% } %>
if (filters.sequelizeModels) { %>return User.destroy({ where: { _id: req.params.id } })<% } %>
.then(function() {
res.status(204).end();
})
Expand Down