Browse Source

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

pull/146/head
Gabe Kangas 5 years ago
parent
commit
99521e6741
  1. 15
      controllers/embed.go
  2. 6
      router/router.go

15
controllers/embed.go

@ -0,0 +1,15 @@ @@ -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)
}

6
router/router.go

@ -35,6 +35,12 @@ func Start() error { @@ -35,6 +35,12 @@ func Start() error {
// web config api
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()

Loading…
Cancel
Save