SiteController

struct SiteController : SiteControllerUtils

Route gorup that only manages one route: the root route “/”.

  • Declaration

    Swift

    func registerRoutes(_ app: Application) throws
  • rootPageHandler(_:) Asynchronous

    GET /

    Root page. This has a surprising number of queries. Because this page now has all the menu links, it’s important the page not fail if sub-calls fail.

    See more

    Declaration

    Swift

    func rootPageHandler(_ req: Request) async throws -> View
  • GET /about

    Shows the about page, which is a render of a Markdown source file.

    Query Options: * ?boxed=true Removes the site header navbar; useful for apps that want to show this page but not allow general site nav.

    Declaration

    Swift

    func aboutTwitarrViewHandler(_ req: Request) async throws -> View
  • GET /faq

    Shows the FAQ, which is a render of a Markdown source file.

    Query Options: * ?boxed=true Removes the site header navbar; useful for apps that want to show this page but not allow general site nav.

    Declaration

    Swift

    func twitarrFAQViewHandler(_ req: Request) async throws -> View
  • timePageHandler(_:) Asynchronous

    GET /time

    Timezone information page.

    See more

    Declaration

    Swift

    func timePageHandler(_ req: Request) async throws -> View
  • mapPageHandler(_:) Asynchronous

    GET /map

    Ship map

    See more

    Declaration

    Swift

    func mapPageHandler(_ req: Request) async throws -> View