SiteCommunitySupportController
struct SiteCommunitySupportController : SiteControllerUtils
The site routes under /communitysupport: filing and reviewing Community Support reports, the action log, and a CSV export.
Like the other site controllers these call the API (CommunitySupportController) rather than touching the database, so every
access rule lives in one place. These are all private routes: they never accept token auth, and aren’t shareable between users.
-
Form data posted by the report form. Checkboxes are absent when unchecked.
See moreDeclaration
Swift
struct ReportFormContent : Codable -
Form data posted by the status form.
See moreDeclaration
Swift
struct StatusFormContent : Codable -
Declaration
Swift
func registerRoutes(_ app: Application) throws -
Sends a form’s
@handletext to the API as a user link when it names a real account. The text is kept either way.Declaration
Swift
private func userID(forHandle handle: String?, on req: Request) -> UUID?
-
root(_:Asynchronous) Declaration
Swift
func root(_ req: Request) async throws -> View -
reportForm(_:Asynchronous) Declaration
Swift
func reportForm(_ req: Request) async throws -> View -
postReport(_:Asynchronous) POST /communitysupport/reportFiles the report from the form.
Declaration
Swift
func postReport(_ req: Request) async throws -> HTTPStatus -
reports(_:Asynchronous) GET /communitysupport/reportsThe report queue. Takes the API’s
See morestatus,start, andlimitquery parameters.Declaration
Swift
func reports(_ req: Request) async throws -> View -
report(_:Asynchronous) GET /communitysupport/report/:report_idOne report, its timeline, and the status and discussion controls.
See moreDeclaration
Swift
func report(_ req: Request) async throws -> View -
postStatus(_:Asynchronous) POST /communitysupport/report/:report_id/statusDeclaration
Swift
func postStatus(_ req: Request) async throws -> HTTPStatus -
postDiscussion(_:Asynchronous) POST /communitysupport/report/:report_id/discussionStarts the report’s discussion thread, if it doesn’t have one. The page reloads and shows a link to it.
Declaration
Swift
func postDiscussion(_ req: Request) async throws -> HTTPStatus -
actionLog(_:Asynchronous) Declaration
Swift
func actionLog(_ req: Request) async throws -> View -
downloadReports(_:Asynchronous) Declaration
Swift
func downloadReports(_ req: Request) async throws -> Response
-
The
:report_idpath parameter.Declaration
Swift
private func reportID(_ req: Request) throws -> UUID -
Declaration
Swift
struct StatusChoice : Encodable
View on GitHub