diff options
| author | ckonstanski <carlos.konstanski@olo.com> | 2025-10-07 06:53:09 -0600 |
|---|---|---|
| committer | ckonstanski <carlos.konstanski@olo.com> | 2025-10-07 06:53:09 -0600 |
| commit | 50273c110856e18e3ba563b0f62b7273a4dc022b (patch) | |
| tree | cc58541bb299c659c5fd98774d3693aa99ff092a /lisp/service/git-update-service.lisp | |
| parent | 9adba239b937df2830a5110adaa1dae17b7dd7d7 (diff) | |
initial commit
Diffstat (limited to 'lisp/service/git-update-service.lisp')
| -rw-r--r-- | lisp/service/git-update-service.lisp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lisp/service/git-update-service.lisp b/lisp/service/git-update-service.lisp new file mode 100644 index 0000000..31b1c32 --- /dev/null +++ b/lisp/service/git-update-service.lisp @@ -0,0 +1,40 @@ +;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +(declaim (optimize (speed 0) (safety 3) (debug 3))) + +(in-package :snow) + +(defclass git-update-service (rest-service) + () + (:documentation "")) + +(defun git-update-json () + (with-noauth (instance git-update-service) + t)) + +(defclass git-update/view-service (git-update-service) + ((form :initarg :form + :initform nil + :accessor form) + (location-p :initform nil)) + (:documentation "")) + +(defun git-update-view-json () + (with-noauth (instance git-update/view-service) + (setf (form instance) + (make-form "git-update-form" + nil + t + `((:label "Update Git Checkouts" :field-type "button" :onclick "on_git_update_view_clicked()")))))) + +(defclass git-update/results-service (git-update-service) + ((stdout :initarg :stdout + :initform nil + :accessor stdout) + (location-p :initform nil)) + (:documentation "")) + +(defun git-update-results-json () + (with-noauth (instance git-update/results-service) + (cl-fad:with-output-to-temporary-file (f :template "/tmp/snow/temp-%") + (update-git (make-instance 'git-update :stdout (pathname f))) + (setf (stdout instance) (uiop:native-namestring (pathname f)))))) |
