1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-10 09:02:49 +00:00

prevent all audio clips from loading on ui - many other small fixes

This commit is contained in:
2017-04-07 22:35:53 -05:00
parent e6c492a5eb
commit 2811d3cc1e
10 changed files with 83 additions and 55 deletions

View File

@@ -1,11 +1,12 @@
package webserver
import (
"log"
"../config"
"./handlers"
"github.com/buaazp/fasthttprouter"
"github.com/valyala/fasthttp"
"log"
)
func logger(next fasthttp.RequestHandler) fasthttp.RequestHandler {
@@ -28,7 +29,7 @@ func registerRoutes(router *fasthttprouter.Router) {
router.PUT("/upload", handlers.FileUpload)
router.ServeFiles("/static/*filepath", "./static")
router.ServeFiles("/sounds/*filepath", "./sounds")
router.ServeFiles("/sounds/*filepath", config.Config.SoundsPath)
router.NotFound = func(ctx *fasthttp.RequestCtx) {
fasthttp.ServeFile(ctx, "./index.html")