Skip to content

Commit

Permalink
refactor: split handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
cchampou committed Dec 30, 2023
1 parent 390b128 commit f22ec37
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ import (
"net/http"
)

func StatusHandler(w http.ResponseWriter, r *http.Request) {
_, err := w.Write([]byte("OK"))
if err != nil {
panic(err)
}
}

func AddStatusHandler() {
http.HandleFunc("/status", func(w http.ResponseWriter, r *http.Request) {
_, err := w.Write([]byte("OK"))
if err != nil {
panic(err)
}
})
http.HandleFunc("/status", StatusHandler)
}

func AddDiscordInteractionHandler() {
Expand Down

0 comments on commit f22ec37

Please sign in to comment.