Skip to content

Commit 796fd27

Browse files
committed
Merge
2 parents 721218e + 72e1003 commit 796fd27

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/word_keeper/core.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
(GET "/" [] action-index)
3535
(POST "/api/translations/:uid/create" [uid] #(post-translation % (Integer/parseInt uid)))
3636
(GET "/api/translations/:uid" [uid] #(flat-user-translations % uid))
37+
(GET "/api/translations/:uid/word/:word/translation/:translation/delete" [uid, word, translation] #(action-delete-user-translation % uid word translation))
3738
(GET "/vocabulary" [] (-> action-vocabulary auth-middleware))
3839
(GET "/signin" [] action-signin)
3940
(GET "/signout" [] action-signout)

src/word_keeper/frontend.clj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
:notice "Something went wrong. Please try again."
5252
:show_notice true)})))
5353

54+
(defn action-delete-user-translation [req uid word translation]
55+
; call yesql
56+
{:status 301
57+
:headers {"location" "/vocabulary"}})
58+
5459
(defn action-signout [req]
5560
(let [session (assoc (:session req)
5661
:request-token nil

0 commit comments

Comments
 (0)