SiteModController
struct SiteModController : SiteControllerUtilsSiteModController handles a bunch of pages that exist to moderate user content. There’s a .moderator value in UserAccessLevel,
but that doesn’t mean that everything in this controller is accessible by moderators.
The SiteAdminController, by contrast, is responsible for the web front-end to the administration functions, such as server configuration, uploading reg codes/calendars/song lists/game lists, performance monitoring, security, and client management.
- 
                  
                  DeclarationSwift func registerRoutes(_ app: Application) throws
- 
                  moderatorRootPageHandler(_:Asynchronous) DeclarationSwift func moderatorRootPageHandler(_ req: Request) async throws -> View
- 
                  archivedImageHandler(_:Asynchronous) GET /archivedimage/IDModerators only. Returns an image from the image archive (user images that have been replaced by subsequent edits). DeclarationSwift func archivedImageHandler(_ req: Request) async throws -> Response
- 
                  reportsPageHandler(_:Asynchronous) GET /reportsShows moderators a summary of user-submitted reports, grouped by the content that was reported. DeclarationSwift func reportsPageHandler(_ req: Request) async throws -> View
- 
                  closedReportsPageHandler(_:Asynchronous) GET /reports/closedShows moderators a summary of user-submitted reports, grouped by the content that was reported. DeclarationSwift func closedReportsPageHandler(_ req: Request) async throws -> View
- 
                  beginProcessingReportsPostHandler(_:Asynchronous) POST /reports/ID/handleMarks all reports reporting a specific piece of content as being handled by the current user. While a moderator is handling a report, any moderation actions taken get tied to the report being handled. Also, reports being handled are marked as such so other moderators can hopefully avoid duplicate work. Mods should close reports when they’re done to complete the flow. DeclarationSwift func beginProcessingReportsPostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  closeReportsPostHandler(_:Asynchronous) POST /reports/ID/closeSets the state of all reports in a group to Closed. Although it takes an ID of one report, it finds all reports that refer to the same pirce of content, and closes all of them. DeclarationSwift func closeReportsPostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  moderatorLogPageHandler(_:Asynchronous) DeclarationSwift func moderatorLogPageHandler(_ req: Request) async throws -> View
- 
                  moderatorSeamailPageHandler(_:Asynchronous) DeclarationSwift func moderatorSeamailPageHandler(_ req: Request) async throws -> View
- 
                  moderatorGuidePageHandler(_:Asynchronous) 
 See moreGET /moderator/guideDeclarationSwift func moderatorGuidePageHandler(_ req: Request) async throws -> View
- 
                  moderateTwarrtContentPageHandler(_:Asynchronous) GET /moderate/twarrt/IDThis shows a view that focuses on the content that was reported, showing: - The twarrt that was reported
- All reports made against this content
- All previous versions of this content
- (hopefully) Mod actions taken against this content already
 DeclarationSwift func moderateTwarrtContentPageHandler(_ req: Request) async throws -> View
- 
                  setTwarrtModerationStatePostHandler(_:Asynchronous) POST /moderate/twarrt/ID/setstate/STRINGSets the moderation state of the given twarrt. Moderation states include “locked” and “quarantined”, as well as a few others. DeclarationSwift func setTwarrtModerationStatePostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  moderateForumPostContentPageHandler(_:Asynchronous) GET /moderate/forumpost/:post_IDThis shows a view that focuses on the content that was reported, showing: - The post that was reported
- All reports made against this content
- All previous versions of this content
- (hopefully) Mod actions taken against this content already *
 DeclarationSwift func moderateForumPostContentPageHandler(_ req: Request) async throws -> View
- 
                  setForumPostModerationStatePostHandler(_:Asynchronous) POST /moderate/forumpost/ID/setstate/STRINGSets the moderation state of the given forum post. Moderation states include “locked” and “quarantined”, as well as a few others. DeclarationSwift func setForumPostModerationStatePostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  moderateForumContentPageHandler(_:Asynchronous) GET /moderate/forum/:forum_IDThis shows a view that focuses on the content that was reported, showing: - The forum that was reported
- All reports made against this content
- All previous versions of this content
- (hopefully) Mod actions taken against this content already *
 DeclarationSwift func moderateForumContentPageHandler(_ req: Request) async throws -> View
- 
                  setForumCategoryPostHandler(_:Asynchronous) POST /moderate/forum/:forum_ID/move/:category_IDMoves a forum thread into a new category. Once moved, the thread will have the same restrictions on viewability as other threads in the destination category. This means we could make a ‘forum dumpster’ category that was mod-only and mods could move awful forum threads into it, and later review individual posts and hand out bans. The utility of this approach is: without this we don’t have a way to get a forum out of circulation without deleting the whole forum. DeclarationSwift func setForumCategoryPostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  setForumModerationStatePostHandler(_:Asynchronous) POST /moderate/forum/ID/setstate/STRINGSets the moderation state of the given forum. Moderation states include “locked” and “quarantined”, as well as a few others. DeclarationSwift func setForumModerationStatePostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  moderateFezContentPageHandler(_:Asynchronous) GET /moderate/lfg/:fez_IDThis shows a view that focuses on the content that was reported, showing: - The Fez that was reported
- All reports made against this content
- All previous versions of this content
- (hopefully) Mod actions taken against this content already *
 DeclarationSwift func moderateFezContentPageHandler(_ req: Request) async throws -> View
- 
                  setFezModerationStatePostHandler(_:Asynchronous) POST /moderate/lfg/ID/setstate/STRINGSets the moderation state of the given fez. Moderation states include “locked” and “quarantined”, as well as a few others. DeclarationSwift func setFezModerationStatePostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  moderateFezPostContentPageHandler(_:Asynchronous) GET /moderate/fezpost/:fezpost_IDThis shows a view that focuses on the content that was reported, showing: - The Fez Post that was reported
- All reports made against this content
- All previous versions of this content
- (hopefully) Mod actions taken against this content already *
 DeclarationSwift func moderateFezPostContentPageHandler(_ req: Request) async throws -> View
- 
                  setFezPostModerationStatePostHandler(_:Asynchronous) POST /moderate/fezpost/:post_ID/setstate/STRINGSets the moderation state of the given fez. Moderation states include “locked” and “quarantined”, as well as a few others. DeclarationSwift func setFezPostModerationStatePostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  getMicroKaraokeSongsPageHandler(_:Asynchronous) GET /moderate/microkaraokeThis shows a view that shows the MicroKaraoke songs that are: - Completed/Approved: Approved by mods, ready for viewing by all users.
- Completed/Not Approved: Not yet approved, but all necessary video clips have been uploaded
- Not Completed: Songs that do not yet have all their video clips uploaded
 DeclarationSwift func getMicroKaraokeSongsPageHandler(_ req: Request) async throws -> View
- 
                  moderateMicroKaraokeSongPageHandler(_:Asynchronous) GET /moderate/microkaraoke/song/:song_idFor a specific Micro Karaoke song, shows a list of each video clip that makes up the song, along with the user that recorded that clip and a ‘Reject’ button for moderation purposes. See moreDeclarationSwift func moderateMicroKaraokeSongPageHandler(_ req: Request) async throws -> View
- 
                  setMKSongApprovalState(_:Asynchronous) POST /moderate/microkaraoke/:song_ID/approveApproves the given song for publish. Notifies all contributors that their song is ready for viewing. DeclarationSwift func setMKSongApprovalState(_ req: Request) async throws -> HTTPStatus
- 
                  deleteMKSnippet(_:Asynchronous) POST /microkaraoke/snippet/:snippet_ID/deleteApproves the given song for publish. Notifies all contributors that their song is ready for viewing. DeclarationSwift func deleteMKSnippet(_ req: Request) async throws -> HTTPStatus
- 
                  moderateUserProfileContentPageHandler(_:Asynchronous) GET /moderate/userprofile/IDInfo from user’s profile. Previous profile versions, reports against the user’s profile fields or avatar image. See moreDeclarationSwift func moderateUserProfileContentPageHandler(_ req: Request) async throws -> View
- 
                  setUserProfileModerationStatePostHandler(_:Asynchronous) POST /moderate/userprofile/ID/setstate/STRINGSets the moderation state of the given user’s profile. ID is a userID UUID.. Moderation states include “locked” and “quarantined”, as well as a few others. Again: Setting the state to “locked” prevents the user from modifying their profile and avatar, but doesn’t otherwise constrain them. Similarly, quarantine state prevents others from seeing the avatar and profile field text, but doesn’t prevent the user from posting content. DeclarationSwift func setUserProfileModerationStatePostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  moderateUserContentPageHandler(_:Asynchronous) GET /moderate/user/IDShows the User Moderation page, which has the user’s accessLevel controls, temp banning, and a list of all reports filed against any of this user’s content. See moreDeclarationSwift func moderateUserContentPageHandler(_ req: Request) async throws -> View
- 
                  setUserAccessLevelPostHandler(_:Asynchronous) POST /moderate/user/ID/setaccesslevel/STRINGSets the moderation state of the given user’s profile. ID is a userID UUID.. Moderation states include “locked” and “quarantined”, as well as a few others. Again: Setting the state to “locked” prevents the user from modifying their profile and avatar, but doesn’t otherwise constrain them. Similarly, quarantine state prevents others from seeing the avatar and profile field text, but doesn’t prevent the user from posting content. DeclarationSwift func setUserAccessLevelPostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  applyTempBanPostHandler(_:Asynchronous) POST /moderate/user/ID/tempquarantineApplies a temporary quarantine to the user given by ID. While quarantined, the user may not create or edit content, but can still log in and read others’ content. They can still talk in private Seamail chats. They cannot edit their profile or change their avatar image. Temp quarantines effectively change the user’s accessLevel to See more.quarantinedfor the duration, after which the user’s accessLevel reverts to what it was previously.DeclarationSwift func applyTempBanPostHandler(_ req: Request) async throws -> HTTPStatus
- 
                  removeTempBanPostHandler(_:Asynchronous) POST /moderate/user/ID/tempquarantine/deleteApplies a temporary quarantine to the user given by ID. While quarantined, the user may not create or edit content, but can still log in and read others’ content. They can still talk in private Seamail chats. They cannot edit their profile or change their avatar image. Temp quarantines effectively change the user’s accessLevel to .quarantinedfor the duration, after which the user’s accessLevel reverts to what it was previously.DeclarationSwift func removeTempBanPostHandler(_ req: Request) async throws -> HTTPStatus
 View on GitHub
            View on GitHub
           SiteModController Structure Reference
      SiteModController Structure Reference