Skip to content

Commit

Permalink
verification middleware applied
Browse files Browse the repository at this point in the history
Signed-off-by: Omri Bornstein <omribor@gmail.com>
  • Loading branch information
AppleGamer22 committed Dec 30, 2023
1 parent a7cbf22 commit 5d70f7b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions server/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,23 @@ func NewRakerServer() (*RakerServer, error) {

mux.HandleFunc("/api/auth/sign_up/instagram", rakerServer.InstagramSignUp)
mux.HandleFunc("/api/auth/sign_in/instagram", rakerServer.InstagramSignIn)
mux.HandleFunc("/api/auth/update/instagram", rakerServer.InstagramUpdateCredentials)
mux.HandleFunc("/api/auth/sign_out/instagram", rakerServer.InstagramSignOut)
mux.HandleFunc("/api/categories", rakerServer.Categories)
mux.HandleFunc("/api/history", rakerServer.History)
mux.Handle("/api/auth/update/instagram", rakerServer.Verify(http.HandlerFunc(rakerServer.InstagramUpdateCredentials)))
mux.Handle("/api/auth/sign_out/instagram", rakerServer.Verify(http.HandlerFunc(rakerServer.InstagramSignOut)))
mux.Handle("/api/categories", rakerServer.Verify(http.HandlerFunc(rakerServer.Categories)))
mux.Handle("/api/history", rakerServer.Verify(http.HandlerFunc(rakerServer.History)))
// mux.HandleFunc("/api/info", rakerServer.Information)
mux.Handle("/api/storage/", http.StripPrefix("/api/storage", rakerServer.Verify(NewStorageHandler(configuration.Storage, configuration.Directories))))
mux.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("assets"))))
mux.Handle("/favicon.ico", http.RedirectHandler("/assets/icons/favicon.ico", http.StatusPermanentRedirect))
mux.Handle("/robots.txt", http.RedirectHandler("/assets/robots.txt", http.StatusPermanentRedirect))

mux.HandleFunc("/", rakerServer.AuthenticationPage)
mux.HandleFunc("/history", rakerServer.HistoryPage)
mux.HandleFunc("/instagram", rakerServer.InstagramPage)
mux.HandleFunc("/highlight", rakerServer.HighlightPage)
mux.HandleFunc("/story", rakerServer.StoryPage)
mux.HandleFunc("/tiktok", rakerServer.TikTokPage)
mux.HandleFunc("/vsco", rakerServer.VSCOPage)
mux.Handle("/history", rakerServer.Verify(http.HandlerFunc(rakerServer.HistoryPage)))
mux.Handle("/instagram", rakerServer.Verify(http.HandlerFunc(rakerServer.InstagramPage)))
mux.Handle("/highlight", rakerServer.Verify(http.HandlerFunc(rakerServer.HighlightPage)))
mux.Handle("/story", rakerServer.Verify(http.HandlerFunc(rakerServer.StoryPage)))
mux.Handle("/tiktok", rakerServer.Verify(http.HandlerFunc(rakerServer.TikTokPage)))
mux.Handle("/vsco", rakerServer.Verify(http.HandlerFunc(rakerServer.VSCOPage)))

rakerServer.HTTPServer = http.Server{
Addr: fmt.Sprintf(":%d", configuration.Port),
Expand Down

0 comments on commit 5d70f7b

Please sign in to comment.