Add asset generation.

This commit is contained in:
2020-03-20 05:49:12 +10:30
parent 1ef062d19c
commit 752ff42a19
2 changed files with 7 additions and 5 deletions

View File

@@ -1,11 +1,11 @@
package web
import (
"discord-auto-upload/asset"
"encoding/json"
"fmt"
"log"
"net/http"
"github.com/tardisx/discord-auto-upload/assets"
)
// DAUWebServer - stuff for the web server
@@ -31,13 +31,13 @@ var wsConfig DAUWebServer
// }
func getIndex(w http.ResponseWriter, r *http.Request) {
data, err := asset.Asset("index.html")
data, err := assets.Asset("index.html")
if err != nil {
// Asset was not found.
fmt.Fprintln(w, err)
}
w.Write(data)
//
}
func getSetWebhook(w http.ResponseWriter, r *http.Request) {