aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-05-21 05:38:20 -0400
committerPaul Duncan <pabs@pablotron.org>2016-05-21 05:38:20 -0400
commite1491b7a9b39cd59932efcfa68affdc4894c953d (patch)
treeda99cadd55648d6d0e06b54da0df2cb60928daae
parent62e6a47fb6cfea6d295e601c9c156b063ad8251e (diff)
downloadguff-e1491b7a9b39cd59932efcfa68affdc4894c953d.tar.bz2
guff-e1491b7a9b39cd59932efcfa68affdc4894c953d.zip
make SessionModel#create consistent with other SessionModel calls
-rw-r--r--src/guff.cr6
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