1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

Save user settings to the database and embed them to the template for fast access.

This commit is contained in:
Simo Kinnunen 2014-07-04 22:59:29 +09:00
parent 332c7b6106
commit e13fc6701f
11 changed files with 152 additions and 141 deletions

View file

@ -256,6 +256,13 @@ module.exports = function(options) {
new Promise(function(resolve) {
socket.on('disconnect', resolve)
// Settings
.on('user.settings.update', function(data) {
dbapi.updateUserSettings(user.email, data)
})
.on('user.settings.reset', function() {
dbapi.resetUserSettings(user.email)
})
// Touch events
.on('input.touchDown', createTouchHandler(wire.TouchDownMessage))
.on('input.touchMove', createTouchHandler(wire.TouchMoveMessage))