Explorar o código

fix für params insert

hmt %!s(int64=7) %!d(string=hai) anos
pai
achega
65f5507686
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      sv.rb

+ 1 - 1
sv.rb

@@ -117,7 +117,7 @@ class SV < Sinatra::Application
 
   post '/info' do
     protected!
-    if DB[:infos].insert(params)
+    if DB[:infos].insert(:text => params[:text], :timestamp => params[:timestamp])
       session[:flash] = [1, "Die Info wurde gespeichert"]
     else
       session[:flash] = [0, "Es gab einen Fehler beim Speichern der Info"]