diff options
author | Colin Okay <okay@toyful.space> | 2022-02-25 12:02:50 -0600 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-02-25 12:02:50 -0600 |
commit | 3f1b479c8233bea2f4159957441edfce76997e3f (patch) | |
tree | 656efea0cab1e0a31f69b8eadbf363adc15f966d /src | |
parent | 8e615caf9725fac9f89c914f5aec2fdc852194d1 (diff) |
unflag is admin only
Diffstat (limited to 'src')
-rw-r--r-- | src/main.lisp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.lisp b/src/main.lisp index e31aa76..27afeda 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -582,12 +582,14 @@ admin privileges are allowed to perform this action." (defendpoint* :put "/oneliner/:entry a-oneliner-id:/flag" ((token an-api-token) (value a-boolean)) (:auth t) - "Flag the oneliner for review." + "Flag / Unflag the oneliner for review." (when (and (lockedp entry) (not (adminp (api-contributor token)))) (http-err 403)) (if value (flag-oneliner entry (api-contributor token)) - (unflag-oneliner entry)) + (if (adminp (api-contributor token)) + (unflag-oneliner entry) + (http-err 403))) "true") (defendpoint* :get "/oneliners/all-flagged" ((limit an-int)) |