Greetings

Hello and welcome. You've reached the back end for https://wart.gay, a web app built to handle the suggestion and selection of weekly art prompts. This server was created to handle a persistent database of prompts and associated data as required by the front end.

General Methods

/status (GET)

Check server status.

parameters: none

=> "online"

/active (GET)

Get currently selected prompt.

parameters: none

=> active prompt as string | "---"

/category (GET)

Get all prompts in specified category.

parameters:

=> json array of prompts in category

/authenticate (GET)

Check validity of admin password.

parameters:

=> true | false

/suggest (POST)

Add a prompt to the suggestion pool.

parameters:

=> success message echoing parameter

/endorse (PATCH)

Add 1 point of endorsement to specified prompt.

parameters:

=> success message echoing parameter

Admin Methods

All admin methods require the site password as a parameter and can return 401 "unauthorized access" if it is incorrect.

/approve (PATCH)

Approve an array of pending prompts.

parameters:

=> acknowledgement of request

/reject (PATCH)

Reject an array of pending prompt.

parameters:

=> acknowledgement of request

/select (PATCH)

Randomly select a new active prompt from the current pool.

parameters: none

=> success message including newly selected prompt

/override (PATCH)

Override the currently active prompt. Will move the outgoing active prompt back to the current(prospective) pool.

parameters:

=> success message including newly selected prompt

/set-endorsements (PATCH)

Set the endorsement level of target prompt to specified level.

parameters:

=> success message echoing parameters

/insert (POST)

Insert prompt into database category with optionally specified selection date. If prompt already exists, category and selection date will be updated.

parameters:

=> descriptive success or error message

/delete (DELETE)

Remove prompt from database

parameters:

=> success message echoing parameter