Tweaking to figure out the nextcloud apis
This commit is contained in:
		
							parent
							
								
									cd2109dc4a
								
							
						
					
					
						commit
						19deba35c4
					
				
					 2 changed files with 14 additions and 17 deletions
				
			
		
							
								
								
									
										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
 | 
			
		||||
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
 | 
			
		||||
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.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
(require "hunchentoot")
 | 
			
		||||
(require "dexador")
 | 
			
		||||
(require "drakma")
 | 
			
		||||
(require "com.inuoe.jzon")
 | 
			
		||||
(require "serapeum")
 | 
			
		||||
(require "bordeaux-threads")
 | 
			
		||||
| 
						 | 
				
			
			@ -246,16 +247,9 @@
 | 
			
		|||
                                                 *last-list-data*
 | 
			
		||||
                                                 :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"
 | 
			
		||||
              :basic-auth '("chris" . "2VHeGxeC^Zf9KqFK^G@Pt!zu2q^6@b")
 | 
			
		||||
              :content (stringify `(("tableId" . 4)
 | 
			
		||||
                                    ("data" . ,special-data)))
 | 
			
		||||
              :content `(("data" . ,(stringify special-data)))
 | 
			
		||||
              :verbose t)
 | 
			
		||||
    ))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -493,17 +487,20 @@ with the image attached"
 | 
			
		|||
                                         (acons name content form-list)))) nil)
 | 
			
		||||
 | 
			
		||||
                         (if (string= "image" name)
 | 
			
		||||
                             (progn (format t "~&~A: ~A" name image-file-name)
 | 
			
		||||
                                    (setq form-list
 | 
			
		||||
                                          (acons name image-file-name form-list))
 | 
			
		||||
                                    (save-string-file
 | 
			
		||||
                                     (apply #'concatenate 'string content)
 | 
			
		||||
                                     image-file-name)
 | 
			
		||||
                                    (setf attachment image-file-name)))
 | 
			
		||||
                             (progn
 | 
			
		||||
                               (format t "~&~A: ~A" name image-file-name)
 | 
			
		||||
                               (if (uiop:file-exists-p image-file-name)
 | 
			
		||||
                                   (progn
 | 
			
		||||
                                     (setq form-list
 | 
			
		||||
                                           (acons name image-file-name form-list))
 | 
			
		||||
                                     (save-string-file
 | 
			
		||||
                                      (apply #'concatenate 'string content)
 | 
			
		||||
                                      image-file-name)
 | 
			
		||||
                                     (setf attachment image-file-name)))))
 | 
			
		||||
                         
 | 
			
		||||
                         (setq *last-list-data*
 | 
			
		||||
                               (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)
 | 
			
		||||
                 (format nil "thankyou")))))))
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue