Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
fix releases bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanOrsh committed Dec 18, 2018
1 parent c419f14 commit 613613b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
3 changes: 2 additions & 1 deletion app/routes/releases/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
1 change: 1 addition & 0 deletions app/views/games/releases-controls.jade
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 613613b

Please sign in to comment.