summaryrefslogtreecommitdiff
path: root/lisp/service/home-service.lisp
diff options
context:
space:
mode:
authorckonstanski <carlos.konstanski@olo.com>2025-10-07 06:53:09 -0600
committerckonstanski <carlos.konstanski@olo.com>2025-10-07 06:53:09 -0600
commit50273c110856e18e3ba563b0f62b7273a4dc022b (patch)
treecc58541bb299c659c5fd98774d3693aa99ff092a /lisp/service/home-service.lisp
parent9adba239b937df2830a5110adaa1dae17b7dd7d7 (diff)
initial commit
Diffstat (limited to 'lisp/service/home-service.lisp')
-rw-r--r--lisp/service/home-service.lisp18
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))))