Skip to content

Commit

Permalink
Changing how authentication works
Browse files Browse the repository at this point in the history
  • Loading branch information
COMTOP1 committed Jan 6, 2025
1 parent f8f16fe commit 8e14f4e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,23 +126,23 @@ func (r *Router) loadRoutes() {

authed := r.router.Group("/")
authed.Use(r.views.Authenticated)
authed.Match(validMethods, "/", r.views.HomeFunc)
authed.Match(validMethods, "/endpoints", r.views.EndpointsFunc)
authed.Match(validMethods, "/streams", r.views.StreamsFunc) // Call made by home to view all active streams for the endpoints
authed.Match(validMethods, "/start", r.views.StartFunc) // Call made by home to start forwarding
authed.Match(validMethods, "/resume", r.views.ResumeFunc) // To return to the page that controls a stream
authed.Match(validMethods, "/status", r.views.StatusFunc) // Call made by home to view status
authed.Match(validMethods, "/stop", r.views.StopFunc) // Call made by home to stop forwarding
authed.Match(validMethods, "/list", r.views.ListFunc) // List view of current forwards
authed.Match(validMethods, "/save", r.views.SaveFunc) // Where you can save a stream for later
authed.Match(validMethods, "/recall", r.views.RecallFunc) // Where you can recall a saved stream to modify it if needed and start it
authed.Match(validMethods, "/delete", r.views.DeleteFunc) // Deletes the saved stream if it is no longer needed
authed.Match(validMethods, "/startUnique", r.views.StartUniqueFunc) // Call made by home to start forwarding from a recalled stream
authed.Match(validMethods, "", r.views.HomeFunc)
authed.Match(validMethods, "endpoints", r.views.EndpointsFunc)
authed.Match(validMethods, "streams", r.views.StreamsFunc) // Call made by home to view all active streams for the endpoints
authed.Match(validMethods, "start", r.views.StartFunc) // Call made by home to start forwarding
authed.Match(validMethods, "resume", r.views.ResumeFunc) // To return to the page that controls a stream
authed.Match(validMethods, "status", r.views.StatusFunc) // Call made by home to view status
authed.Match(validMethods, "stop", r.views.StopFunc) // Call made by home to stop forwarding
authed.Match(validMethods, "list", r.views.ListFunc) // List view of current forwards
authed.Match(validMethods, "save", r.views.SaveFunc) // Where you can save a stream for later
authed.Match(validMethods, "recall", r.views.RecallFunc) // Where you can recall a saved stream to modify it if needed and start it
authed.Match(validMethods, "delete", r.views.DeleteFunc) // Deletes the saved stream if it is no longer needed
authed.Match(validMethods, "startUnique", r.views.StartUniqueFunc) // Call made by home to start forwarding from a recalled stream
r.router.Match(validMethods, "/youtubehelp", r.views.YoutubeHelpFunc) // YouTube help page
r.router.Match(validMethods, "/facebookhelp", r.views.FacebookHelpFunc) // Facebook help page
r.router.Match(validMethods, "/"+r.config.StreamerWebsocketPath, r.views.Websocket) // Websocket for the recorder and forwarder to communicate on
r.router.Match(validMethods, "/activeStreams", r.views.ActiveStreamsFunc)
authed.Match(validMethods, "/"+r.config.StreamerAdminPath+"/forceRemove/:unique", r.views.ForceRemoveFunc)
authed.Match(validMethods, r.config.StreamerAdminPath+"/forceRemove/:unique", r.views.ForceRemoveFunc)
r.router.Match(validMethods, "/serverError", r.views.ServerErrorFunc)
r.router.GET("/api/health", func(c echo.Context) error {
marshal, err := json.Marshal(struct {
Expand Down

0 comments on commit 8e14f4e

Please sign in to comment.