Move API endpoints under an API url namespace. Closes #148

This commit is contained in:
Gabe Kangas
2020-09-14 16:15:53 -07:00
parent 6a3f634ef5
commit 80b2b9e668
2 changed files with 8 additions and 8 deletions

View File

@@ -21,20 +21,20 @@ func Start() error {
http.HandleFunc("/", controllers.IndexHandler)
// status of the system
http.HandleFunc("/status", controllers.GetStatus)
http.HandleFunc("/api/status", controllers.GetStatus)
// custom emoji supported in the chat
http.HandleFunc("/emoji", controllers.GetCustomEmoji)
http.HandleFunc("/api/emoji", controllers.GetCustomEmoji)
if !config.Config.DisableWebFeatures {
// websocket chat server
go chat.Start()
// chat rest api
http.HandleFunc("/chat", controllers.GetChatMessages)
http.HandleFunc("/api/chat", controllers.GetChatMessages)
// web config api
http.HandleFunc("/config", controllers.GetWebConfig)
http.HandleFunc("/api/config", controllers.GetWebConfig)
// chat embed
http.HandleFunc("/embed/chat", controllers.GetChatEmbed)