blob: b463a4d2799172b9852484793de42f07a13677b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
(in-package #:vampire)
(wknd:defendpoint invites
:using user-known
:post :to "invites"
:handle
(progn
(db:with-transaction ()
(make-instance 'invite :maker user :uses-remaining 1))
(wknd:endpoint-redirect 'home.html)))
(defun invite-validp (invite)
(let ((uses (uses-remaining invite)))
(or (< 0 uses) (null uses))))
|