diff options
| author | Bret Koppel <bret@olo.com> | 2025-10-07 09:00:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-07 09:00:37 -0400 |
| commit | 910d7fd656b9e957181732b36761449de5a970d1 (patch) | |
| tree | 0f8ee46af3e93aa489785d64d54c5e155ef0057b /lisp/service/home-service.lisp | |
| parent | 9adba239b937df2830a5110adaa1dae17b7dd7d7 (diff) | |
| parent | 0ad86ba37be273ee1fe4d9bdd5f7bb15c5701abf (diff) | |
Merge pull request #1 from ololabs/initial-commit
initial commit
Diffstat (limited to 'lisp/service/home-service.lisp')
| -rw-r--r-- | lisp/service/home-service.lisp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/service/home-service.lisp b/lisp/service/home-service.lisp new file mode 100644 index 0000000..509be5e --- /dev/null +++ b/lisp/service/home-service.lisp @@ -0,0 +1,18 @@ +;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +(declaim (optimize (speed 0) (safety 3) (debug 3))) + +(in-package :snow) + +(defclass home-service (rest-service) + ((content :initarg :content + :initform nil + :accessor content)) + (:documentation "")) + +(defmethod initialize-instance :after ((home-service home-service) &key) + (setf (content home-service) (format nil "Welcome to the ~a" (title *webapp*)))) + +(defun home-json (&optional message errormsg) + (with-noauth (instance home-service) + (when message (setf (message instance) message)) + (when errormsg (setf (errormsg instance) errormsg)))) |
