diff --git a/docs/examples/simple-server.lisp b/docs/examples/simple-server.lisp index 65433c4..755a66c 100644 --- a/docs/examples/simple-server.lisp +++ b/docs/examples/simple-server.lisp @@ -150,13 +150,15 @@ The ID and ENDPOINTS are derived using the parameter USERNAME and the global *US (let ((obj (make-instance 'user)) (uri (format nil *user-id-format* (getf *config* :host) username))) - (flet ((sub-uri (path) - (format nil "~A/~A" uri path))) + (flet ((sub-user-uri (path) + (format nil "~A/~A" uri path)) + (sub-host-uri (path) + (format nil "~A/~A" (getf *config* :host) path))) (setf (ass:preferred-username obj) username) (setf (ass:name obj) nickname) - (setf (ass:inbox obj) (sub-uri "inbox")) - (setf (ass:outbox obj) (sub-uri "outbox")) - (setf (ass:following obj) (sub-uri "following")) - (setf (ass:followers obj) (sub-uri "followers")) + (setf (ass:inbox obj) (sub-host-uri "inbox")) + (setf (ass:outbox obj) (sub-host-uri "outbox")) + (setf (ass:following obj) (sub-user-uri "following")) + (setf (ass:followers obj) (sub-user-uri "followers")) (setf (json-ld:@id obj) uri)) obj))