summaryrefslogtreecommitdiff
path: root/lisp/service/logout-service.lisp
blob: ce6a09f0f959a79fbb629b0e6102f4d60ccd425d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
(declaim (optimize (speed 0) (safety 3) (debug 3)))

(in-package :woodriverlessons)

(defclass logout-service (rest-service)
  ((location-p :initform nil))
  (:documentation ""))

(defun logout-json ()
  (with-noauth (instance logout-service)
    (set-user (make-default-user))
    (setf (location instance) "/home")
    (setf (message instance) "You are now logged out.")))