Redirect /embed/chat and /embed/video to the embedable pages. Closes #110

This commit is contained in:
Gabe Kangas 2020-08-30 16:32:09 -07:00
parent 351fbe8834
commit 99521e6741
2 changed files with 21 additions and 0 deletions

15
controllers/embed.go Normal file
View File

@ -0,0 +1,15 @@
package controllers
import (
"net/http"
)
//GetChatEmbed gets the embed for chat
func GetChatEmbed(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/index-standalone-chat.html", http.StatusMovedPermanently)
}
//GetVideoEmbed gets the embed for video
func GetVideoEmbed(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/index-video-only.html", http.StatusMovedPermanently)
}

View File

@ -35,6 +35,12 @@ func Start() error {
// web config api // web config api
http.HandleFunc("/config", controllers.GetWebConfig) http.HandleFunc("/config", controllers.GetWebConfig)
// chat embed
http.HandleFunc("/embed/chat", controllers.GetChatEmbed)
// video embed
http.HandleFunc("/embed/video", controllers.GetVideoEmbed)
} }
port := config.Config.GetPublicWebServerPort() port := config.Config.GetPublicWebServerPort()