aboutsummaryrefslogtreecommitdiffstats
path: root/scrumli.lisp
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-07-04 23:55:43 +0200
committerGravatar Tom Willemse2013-07-04 23:55:43 +0200
commit12ee321c64a964a56ad26a8d342f52c76250a0a3 (patch)
treef74b9044aecbc500010742dc41b4a6aaac4be214 /scrumli.lisp
parent6edd373ad92f6c966120c63ffe5b53fefe81d81e (diff)
downloadscrumli-12ee321c64a964a56ad26a8d342f52c76250a0a3.tar.gz
scrumli-12ee321c64a964a56ad26a8d342f52c76250a0a3.zip
Task state and priority editing
Diffstat (limited to 'scrumli.lisp')
-rw-r--r--scrumli.lisp30
1 files changed, 24 insertions, 6 deletions
diff --git a/scrumli.lisp b/scrumli.lisp
index 0f563d9..24c4469 100644
--- a/scrumli.lisp
+++ b/scrumli.lisp
@@ -90,18 +90,36 @@
(define-route stories-state ("stories/state" :method :post)
(if (logged-in-p)
(let* ((id (hunchentoot:post-parameter "id"))
- (current-state (story-get-state id)))
- (story-set-state id (ecase (intern current-state :scrumli)
- (todo "DOING")
- (doing "DONE")
- (done "TODO")))
+ (current-state (story-get-state 'story id)))
+ (story-set-state 'story id (ecase (intern current-state :scrumli)
+ (todo "DOING")
+ (doing "DONE")
+ (done "TODO")))
200)
403))
+(define-route task-state ("tasks/state" :method :post)
+ (if (logged-in-p)
+ (let* ((id (hunchentoot:post-parameter "id"))
+ (current-state (story-get-state 'task id)))
+ (story-set-state 'task id (ecase (intern current-state :scrumli)
+ (todo "DOING")
+ (doing "DONE")
+ (done "TODO"))))))
+
(define-route stories-priority ("stories/:dir" :method :post)
(if (logged-in-p)
(let* ((id (hunchentoot:post-parameter "id")))
- (story-change-priority id (intern (string-upcase dir) :keyword))
+ (story-change-priority
+ 'story id (intern (string-upcase dir) :keyword))
+ 200)
+ 403))
+
+(define-route task-priority ("tasks/:dir" :method :post)
+ (if (logged-in-p)
+ (let* ((id (hunchentoot:post-parameter "id")))
+ (story-change-priority
+ 'task id (intern (string-upcase dir) :keyword))
200)
403))