diff options
author | Paul Duncan <pabs@pablotron.org> | 2016-05-21 05:38:20 -0400 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2016-05-21 05:38:20 -0400 |
commit | e1491b7a9b39cd59932efcfa68affdc4894c953d (patch) | |
tree | da99cadd55648d6d0e06b54da0df2cb60928daae /src | |
parent | 62e6a47fb6cfea6d295e601c9c156b063ad8251e (diff) | |
download | guff-e1491b7a9b39cd59932efcfa68affdc4894c953d.tar.bz2 guff-e1491b7a9b39cd59932efcfa68affdc4894c953d.zip |
make SessionModel#create consistent with other SessionModel calls
Diffstat (limited to 'src')
-rw-r--r-- | src/guff.cr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/guff.cr b/src/guff.cr index 64c212e..8046af7 100644 --- a/src/guff.cr +++ b/src/guff.cr @@ -228,12 +228,12 @@ module Guff false end - def create(hash : Hash(String, String)) : String + def create(data : String) : String # generate id r = SecureRandom.hex(32) # save session - @sessions[r] = hash.to_json + @sessions[r] = data # return session id r @@ -285,7 +285,7 @@ module Guff def create(hash : Hash(String, String)) : String clear merge!(hash) - @session_id = @context.models.session.create(hash) + @session_id = @context.models.session.create(hash.to_json) end def save |