Skip to content

Commit 2ba661f

Browse files
committed
ranks: fixed webpanel editation causing undefined hours
1 parent 18bb586 commit 2ba661f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

libs/systems/ranks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Ranks.prototype.listSocket = function (self, socket) {
5252

5353
Ranks.prototype.editSocket = function (self, socket, data) {
5454
if (data.value.length === 0) self.remove(self, null, data.id)
55-
else global.botDB.update({ _id: 'rank_' + data.id }, { rank: data.value })
55+
else global.botDB.update({ _id: 'rank_' + data.id }, { rank: data.value, hours: data.id })
5656
self.listSocket(self, socket)
5757
}
5858

public/pages/ranks.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ <h2 class="title" data-lang="create"></h2>
6464
socket.emit('deleteRank', el.dataset.hours)
6565
},
6666
create: function (event) {
67+
event.preventDefault()
6768
var data = {hours: $("#inputWatched").val(), rank: $("#inputName").val()}
6869
socket.emit('createRank', data)
6970
$("#inputWatched").val('')

0 commit comments

Comments
 (0)