tests fixed

This commit is contained in:
Christian Mueller
2014-03-28 22:05:08 +01:00
parent 27e47d11e6
commit d2b8b0dd94
2 changed files with 7 additions and 8 deletions
+4 -4
View File
@@ -93,14 +93,14 @@
(response 500)))
(response 400)))
(POST "/update-note" [note-id note password]
(POST "/update-note" [noteID note password]
(let [pid "NoteHub"
psk (storage/get-psk pid)
params {:noteID note-id :note note :password password :pid pid}]
params {:noteID noteID :note note :password password :pid pid}]
(if (storage/valid-publisher? pid)
(let [resp (api/update-note (assoc params
:signature
(storage/sign pid psk note-id note password)))]
:signature
(storage/sign pid psk noteID note password)))]
(if (get-in resp [:status :success])
(redirect (:longURL resp))
(response 403)))
+3 -4
View File
@@ -36,10 +36,9 @@
(redis :hset :publisher-key pid psk)
psk)))
; This was uncommented, because the DB isn't
; available on heroku at compile time
#_ (when-not (valid-publisher? "NoteHub")
(register-publisher "NoteHub"))
(when (and (get-setting :dev-mode)
(not (valid-publisher? "NoteHub"))
(register-publisher "NoteHub")))
(defn revoke-publisher [pid]
(redis :hdel :publisher-key pid))