Skip to content

Commit

Permalink
Small adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Chmieloo committed Sep 10, 2017
1 parent 913759f commit d481c31
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions controller/match_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ router.post('/new', function (req, res) {
debug('New game added', gameType);
new Game({
game_type_id: gameType,
owe_type_id: gameStake,
owe_type_id: gameStake == "0" ? undefined : gameStake,
created_at: moment().format("YYYY-MM-DD HH:mm:ss")
})
.save(null, {method: 'insert'})
Expand Down Expand Up @@ -450,7 +450,9 @@ router.post('/:id/finish', function (req, res) {
winner_id: currentPlayerId,
})
.then(function (row) {

if (game.owe_type_id !== null) {
// TODO - for each player, check if it is a winner and add owe
}
res.status(200).end();
});
} else {
Expand Down
Binary file modified public/images/beer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion views/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ block content
div(class='form-group')
label(for='matchStakeSelect') Game Stake
select(class='form-control' name='gameStake' id='gameStakeSelect')
option(value=undefined) -
option(value=0) -
each gameStake in gameStakes
option(value=gameStake.id)=gameStake.item

Expand Down
4 changes: 2 additions & 2 deletions views/match_socket.pug
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ block scripts
}

if (!player.isBeerCheckoutSafe) {
label.addClass('beer');
td.addClass('beer');
}
else {
label.removeClass('beer');
td.removeClass('beer');
}
if (player.isViliusVisit) {
label.addClass('vilius');
Expand Down

0 comments on commit d481c31

Please sign in to comment.