From e1491b7a9b39cd59932efcfa68affdc4894c953d Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 21 May 2016 05:38:20 -0400 Subject: make SessionModel#create consistent with other SessionModel calls --- src/guff.cr | 6 +++--- 1 file 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 -- cgit v1.2.3