Tweaking to figure out the nextcloud apis
This commit is contained in:
parent
cd2109dc4a
commit
19deba35c4
2
TODO.org
2
TODO.org
|
@ -8,6 +8,6 @@ The multiline text options do not grab the entire entry. I'll need to fix that b
|
||||||
* DONE Make single newline show up
|
* DONE Make single newline show up
|
||||||
multiline text options do not include a single newline. They showup as a SPACE and a TAB
|
multiline text options do not include a single newline. They showup as a SPACE and a TAB
|
||||||
* TODO Fix the lisp server to use nextcloud tables
|
* TODO Fix the lisp server to use nextcloud tables
|
||||||
SCHEDULED: <2023-12-14 Thu 12:00>
|
SCHEDULED: <2023-12-18 Mon 12:00>
|
||||||
** TODO Setup the lisp server on the actual server and test there for a while.
|
** TODO Setup the lisp server on the actual server and test there for a while.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(require "hunchentoot")
|
(require "hunchentoot")
|
||||||
(require "dexador")
|
(require "dexador")
|
||||||
|
(require "drakma")
|
||||||
(require "com.inuoe.jzon")
|
(require "com.inuoe.jzon")
|
||||||
(require "serapeum")
|
(require "serapeum")
|
||||||
(require "bordeaux-threads")
|
(require "bordeaux-threads")
|
||||||
|
@ -246,16 +247,9 @@
|
||||||
*last-list-data*
|
*last-list-data*
|
||||||
:test 'string=))))))
|
:test 'string=))))))
|
||||||
|
|
||||||
(setq special-data `#(("columnId" 37 "value" ,(serapeum:trim-whitespace
|
|
||||||
(cdr (assoc
|
|
||||||
"Student Name"
|
|
||||||
*last-list-data*
|
|
||||||
:test 'string=))))))
|
|
||||||
|
|
||||||
(dex:post "https://staff.tfcconnection.org/apps/tables/api/1/tables/4/rows"
|
(dex:post "https://staff.tfcconnection.org/apps/tables/api/1/tables/4/rows"
|
||||||
:basic-auth '("chris" . "2VHeGxeC^Zf9KqFK^G@Pt!zu2q^6@b")
|
:basic-auth '("chris" . "2VHeGxeC^Zf9KqFK^G@Pt!zu2q^6@b")
|
||||||
:content (stringify `(("tableId" . 4)
|
:content `(("data" . ,(stringify special-data)))
|
||||||
("data" . ,special-data)))
|
|
||||||
:verbose t)
|
:verbose t)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -493,17 +487,20 @@ with the image attached"
|
||||||
(acons name content form-list)))) nil)
|
(acons name content form-list)))) nil)
|
||||||
|
|
||||||
(if (string= "image" name)
|
(if (string= "image" name)
|
||||||
(progn (format t "~&~A: ~A" name image-file-name)
|
(progn
|
||||||
|
(format t "~&~A: ~A" name image-file-name)
|
||||||
|
(if (uiop:file-exists-p image-file-name)
|
||||||
|
(progn
|
||||||
(setq form-list
|
(setq form-list
|
||||||
(acons name image-file-name form-list))
|
(acons name image-file-name form-list))
|
||||||
(save-string-file
|
(save-string-file
|
||||||
(apply #'concatenate 'string content)
|
(apply #'concatenate 'string content)
|
||||||
image-file-name)
|
image-file-name)
|
||||||
(setf attachment image-file-name)))
|
(setf attachment image-file-name)))))
|
||||||
|
|
||||||
(setq *last-list-data*
|
(setq *last-list-data*
|
||||||
(append *last-list-data* form-list))))
|
(append *last-list-data* form-list))))
|
||||||
;; (post-health-form *last-list-data*)
|
(post-health-form *last-list-data*)
|
||||||
(if (mail-form *last-list-data* attachment)
|
(if (mail-form *last-list-data* attachment)
|
||||||
(format nil "thankyou")))))))
|
(format nil "thankyou")))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue