47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
package main
|
|
|
|
import (
|
|
"io"
|
|
"net/http"
|
|
)
|
|
|
|
func root(w http.ResponseWriter, r *http.Request) {
|
|
io.WriteString(w, "WIP Vanity Tester Backend")
|
|
}
|
|
|
|
func getAllBadges(w http.ResponseWriter, r *http.Request) {
|
|
asd := parseAllBadges()
|
|
io.WriteString(w, asd)
|
|
}
|
|
|
|
// func sevenTvPaints(w http.ResponseWriter, r *http.Request) {
|
|
// svt := &SevenTv{}
|
|
// badges, err := svt.getPaints()
|
|
// if err != nil {
|
|
// http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
// return
|
|
// }
|
|
// io.WriteString(w, badges)
|
|
// }
|
|
|
|
// func sevenTvBadges(w http.ResponseWriter, r *http.Request) {
|
|
// svt := &SevenTv{}
|
|
// badges, err := svt.getBadges()
|
|
// if err != nil {
|
|
// http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
// return
|
|
// }
|
|
// io.WriteString(w, badges)
|
|
// }
|
|
|
|
// func sevenTvUserCosmetics(w http.ResponseWriter, r *http.Request) {
|
|
// svt := &SevenTv{}
|
|
// user := strings.TrimPrefix(r.URL.Path, "/7tv/cosmetics/")
|
|
// logger.Trace().Msg("sevenTvUserCosmetics: user: " + user)
|
|
// badges, err := svt.getUserCosmetics(user)
|
|
// if err != nil {
|
|
// http.Error(w, err.Error(), http.StatusInternalServerError)
|
|
// return
|
|
// }
|
|
// io.WriteString(w, badges)
|
|
// }
|