EditIntent

enum EditIntent : String

Why the user opened an edit form. Set from the intent query parameter on the edit page’s URL, which the moderation views append to their Edit links. It is deliberately not inferred from the user’s access level: a moderator editing one of their own posts from the forum is an ordinary edit and should return to the forum, not to the moderation view.

  • The user reached the edit form the ordinary way, from the content itself.

    Declaration

    Swift

    case normal
  • The user reached the edit form from a moderation view, and should be returned there.

    Declaration

    Swift

    case modEdit
  • Reads the intent from a request’s intent query parameter. An absent or unrecognized value is .normal, so a hand-edited URL cannot do anything but the default.

    Declaration

    Swift

    init(_ req: Request)