JSON -> Marshal

This commit is contained in:
Christoffer Müller Madsen 2017-06-15 11:37:51 +02:00
parent 0f936362d8
commit 7615e29b37

View File

@ -3,7 +3,6 @@ require_relative '../project'
require_relative '../sshkey' require_relative '../sshkey'
require 'sqlite3' require 'sqlite3'
require 'json'
module EmacsCollab module EmacsCollab
module Database module Database
@ -46,7 +45,7 @@ module EmacsCollab
def update_user(user) def update_user(user)
@db.execute("UPDATE Users SET keys = ? WHERE name = ?", @db.execute("UPDATE Users SET keys = ? WHERE name = ?",
[JSON.generate(user.keys),user.id]) [Marshal.dump(user.keys),user.id])
end end
def change_user_password(user,hash,salt) def change_user_password(user,hash,salt)