diff --git a/README.md b/README.md index 5919474..881c3b8 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ SpringRoll Connect is a content management system built using [NodeJS](https://n * Install the latest version of [Docker](https://www.docker.com/) * Copy `sample.env` to `.env`. You can modify these values, but for development you shouldn't have to -* Run `docker-compose up --build` which should build both the mongo db server +* Run `docker-compose up --build` which should build the mongo db server * Run `node server.js` which should start the application server * You should then seed the database with some information by running `node seed.js` * Running `seed.js` will also output the password for a user `admin` diff --git a/app/routes/releases/release.js b/app/routes/releases/release.js index f4c662e..f8ec154 100644 --- a/app/routes/releases/release.js +++ b/app/routes/releases/release.js @@ -42,8 +42,9 @@ router.patch('/:commit_id', async function(req, res) } req.body.updated = Date.now(); - await Release.findByIdAndUpdate(req.body.release, req.body); let release = await Release.getByCommitId(req.body.commitId); + req.body.game = release.game; + await Release.findByIdAndUpdate(release._id, req.body); let game = await Game.getById(release.game); let baseUrl = ''; if (!game.isArchived){ diff --git a/app/views/games/releases-controls.jade b/app/views/games/releases-controls.jade index 86f8882..c0ef62a 100644 --- a/app/views/games/releases-controls.jade +++ b/app/views/games/releases-controls.jade @@ -1,6 +1,7 @@ if isEditor form.controls.pull-right(action="/releases/#{release.commitId}" method="post") input(type="hidden" name="release" value=release._id) + input(type="hidden" name="game" value=game.slug) input(type="hidden" name="action" value="DELETE") button.btn.btn-block.btn-default.dropdown-toggle(data-toggle="confirm" type="submit") span.glyphicon.glyphicon-trash