From f6eebe56ddf714a3860879a6c8be9d8610bcec62 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Thu, 25 Apr 2024 22:54:35 -0500 Subject: [PATCH] beginning to post data to nextcloud tables --- src/main.lisp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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"