Remove the /pin endpoint

This was never supposed to be in there.
This commit is contained in:
Zorchenhimer 2021-01-10 20:06:48 -05:00
parent 58bd6e8a3a
commit ebc51f938c
2 changed files with 0 additions and 23 deletions

View File

@ -2,7 +2,6 @@ package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"path"
@ -290,27 +289,6 @@ func handleEmoteTemplate(w http.ResponseWriter, r *http.Request) {
}
}
func handlePin(w http.ResponseWriter, r *http.Request) {
session, err := sstore.Get(r, "moviesession")
if err != nil {
common.LogDebugf("Unable to get session: %v\n", err)
}
val := session.Values["pin"]
if val == nil {
session.Values["pin"] = "1234"
err := session.Save(r, w)
if err != nil {
fmt.Fprintf(w, "unable to save session: %v", err)
}
fmt.Fprint(w, "Pin was not set")
common.LogDebugln("pin was not set")
} else {
fmt.Fprintf(w, "pin set: %v", val)
common.LogDebugf("pin is set: %v\n", val)
}
}
func handleIndexTemplate(w http.ResponseWriter, r *http.Request) {
if settings.RoomAccess != AccessOpen {
if !checkRoomAccess(w, r) {

View File

@ -143,7 +143,6 @@ func startServer() {
http.HandleFunc("/chat", handleIndexTemplate)
http.HandleFunc("/video", handleIndexTemplate)
http.HandleFunc("/help", handleHelpTemplate)
http.HandleFunc("/pin", handlePin)
http.HandleFunc("/emotes", handleEmoteTemplate)
http.HandleFunc("/", handleDefault)