From 31657f6854edc116946a099be889440fb3e92e53 Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Sat, 27 Nov 2021 10:20:12 -0700 Subject: moved everything under lisp/ --- service/rest-service.lisp | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 service/rest-service.lisp (limited to 'service/rest-service.lisp') diff --git a/service/rest-service.lisp b/service/rest-service.lisp deleted file mode 100644 index ff66dd4..0000000 --- a/service/rest-service.lisp +++ /dev/null @@ -1,36 +0,0 @@ -;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- -(declaim (optimize (speed 0) (safety 3) (debug 3))) - -(in-package :ldapadmin) - -(defclass rest-service (base-service) - ((location :initarg :location - :initform nil - :accessor location) - (location-p :initarg :location-p - :initform t - :accessor location-p) - (message :initarg :message - :initform nil - :accessor message) - (errormsg :initarg :errormsg - :initform nil - :accessor errormsg)) - (:documentation "")) - -(defmethod initialize-instance :after ((rest-service rest-service) &key) - (when (location-p rest-service) - (if (message rest-service) - (setf (session-value :message) (message rest-service)) - (setf (message rest-service) (session-value :message))) - (if (errormsg rest-service) - (setf (session-value :errormsg) (errormsg rest-service)) - (setf (errormsg rest-service) (session-value :errormsg))) - (when (null (location rest-service)) - (setf (location rest-service) (type-to-path rest-service))))) - -(defun location-json (&optional (location "/home")) - (format nil "{\"location\":\"~a\"}" location)) - -(defun type-to-path (rest-type) - (concatenate 'string "/" (ppcre:regex-replace "-service" (string-downcase (type-of rest-type)) "/"))) -- cgit v1.3