Middleware
- 
                  
                  Captures all errors and transforms them into an internal server error HTTP response. See moreDeclarationSwift public final class SwiftarrErrorMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct CalendarSessionFixerMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct DisabledAPISectionMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct DisabledSiteSectionMiddleware : AsyncMiddleware
- 
                  
                  NotificationsMiddleware gets attached to Site routes, and periodically calls an API notification endpoint to get user notifications. The user notificaiton counts are then attached ot the user’s Session. This setup is not ideal as a user with multiple Sessions on different devices may see different notificaitons at different times. Currently this code breaks the UI/API layer separation somewhat by looking at the authenticated User. If we do need to build separate UI and API servers, we can either: * Stop inspecting the See moreupdatedAtproperty; notificaitons will be sligihtly less realtime. * Add a webSocket betwen the UI and API, pass usernames that have new notifications as they happen. * Use Redis pub/sub * Really, the communication is one-way – perhaps build a server endpoint in the UI code and the API layer acts as a client to call it? Via any method, Vapor Sessions aren’t set up for finding sessions by user, or accessing any other Session at all, really.DeclarationSwift struct NotificationsMiddleware : AsyncMiddleware, SiteControllerUtils
- 
                  
                  DeclarationSwift struct RequireAdminMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct RequireModeratorMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct RequireTHOMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct RequireTwitarrTeamMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct RequireVerifiedMiddleware : AsyncMiddleware
- 
                  
                  Captures all errors and transforms them into an internal server error HTTP response. See moreDeclarationSwift public final class SiteErrorMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct SiteRequireAdminMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct SiteRequireModeratorMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct SiteRequireTHOMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct SiteRequireTwitarrTeamMiddleware : AsyncMiddleware
- 
                  
                  DeclarationSwift struct SiteRequireVerifiedMiddleware : AsyncMiddleware
 View on GitHub
            View on GitHub
           Middleware  Reference
      Middleware  Reference