diff --git a/src/main.lisp b/src/main.lisp index f1d382e..95282c5 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -54,7 +54,7 @@ (headers (list (cons "Authorization" *auth-token*) (cons "Content-Type" "application/json"))) (rows (parse (dex:get - "https://staff.tfcconnection.org/apps/tables/api/1/tables/4/rows" + "https://staff.tfcconnection.org/apps/tables/api/1/tables/5/rows" :basic-auth '("chris" . "2VHeGxeC^Zf9KqFK^G@Pt!zu2q^6@b") :verbose t))) (lowid 0) @@ -242,6 +242,15 @@ :verbose t) )) +(defun post-camp-data (data) + "Takes the camp data as an alist and sends it to nextcloud tables to be input" + (let ((new-data '((63 . "Frodo Braggins") (64 . "Bilbo Braggins")))) + (log:info new-data) + (dex:post "https://staff.tfcconnection.org/apps/tables/api/1/tables/5/rows" + :basic-auth '("chris" . "2VHeGxeC^Zf9KqFK^G@Pt!zu2q^6@b") + :content `(("data" . ,(stringify new-data))) + :verbose t))) + (defun mail-mt-form (form attachment) "Takes the form as an alist and sends a table formatted email with the image attached to us"