refactoring van de cmap structuren bijna compleet
This commit is contained in:
+6
-2
@@ -400,6 +400,7 @@ CSS
|
||||
(title->slug title)
|
||||
requested-slug))
|
||||
(define document (request-concept-map-document body))
|
||||
(define rendered-svg (hash-ref body 'renderedSvg ""))
|
||||
(cond
|
||||
((string=? title "") (json-error 400 "Title is required"))
|
||||
((string=? slug "") (json-error 400 "The title cannot be converted to a concept map address"))
|
||||
@@ -411,7 +412,8 @@ CSS
|
||||
slug
|
||||
title
|
||||
document
|
||||
(wiki-user-username (wiki-session-user session)))
|
||||
(wiki-user-username (wiki-session-user session))
|
||||
rendered-svg)
|
||||
#:code 201)))))))
|
||||
|
||||
(define (concept-map-get-handler config req slug)
|
||||
@@ -459,6 +461,7 @@ CSS
|
||||
(define body (request-json req))
|
||||
(define title (string-trim (hash-ref body 'title "")))
|
||||
(define document (request-concept-map-document body))
|
||||
(define rendered-svg (hash-ref body 'renderedSvg ""))
|
||||
(define base-version (hash-ref body 'baseVersion ""))
|
||||
(define snapshot? (eq? (hash-ref body 'snapshot #f) #t))
|
||||
(define supplied-save-kind (hash-ref body 'saveKind #f))
|
||||
@@ -488,7 +491,8 @@ CSS
|
||||
(wiki-user-username (wiki-session-user session))
|
||||
base-version
|
||||
summary
|
||||
action))))))
|
||||
action
|
||||
rendered-svg))))))
|
||||
|
||||
(define (concept-map-rename-handler config req slug)
|
||||
(require-write-role
|
||||
|
||||
Reference in New Issue
Block a user