From b422877219fcfac73c7f1b6b33ff361984a0c045 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 5 Aug 2022 08:53:50 -0500 Subject: [modify] post to /oneliner returns json of new oneliner --- src/main.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main.lisp') diff --git a/src/main.lisp b/src/main.lisp index 1dc2e0f..3d081b4 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -502,7 +502,8 @@ startup process attempts to start as swank server on the provided port. :name name :runstyle (if runstyle (a:make-keyword runstyle) :auto))))) (bt:with-lock-held (*newest-queue-lock*) - (enqueue-qb *newest-queue* ol)))) + (enqueue-qb *newest-queue* ol)) + ol)) (defun unflag-oneliner (oneliner) (db:with-transaction () @@ -783,11 +784,10 @@ have exceeded the invite limit." (:auth t) "Make a new [oneliner](#oneliner)." (validate-new-oneliner-plist (lzb:request-body)) - (apply 'make-new-oneliner - (api-contributor token) - (lzb:request-body)) - - "true") + (let ((ol (apply 'make-new-oneliner + (api-contributor token) + (lzb:request-body)))) + (to-json ol))) (defun admin-only () "The request requires an API access token. Only contributors with -- cgit v1.2.3