mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Fix usage of Box.Bytes causing depreciation message (#295)
* Add release make target * Use Box.Find now that Box.Bytes is depreciated Pretty much directly mocked off of the post-depreciation implementation of Box.Bytes in packr. In theory we should totally be checking the returned error but I'm lazy.
This commit is contained in:
committed by
StashAppDev
parent
52dd0197ee
commit
b31af52d41
@@ -129,7 +129,7 @@ func Start() {
|
||||
r.HandleFunc("/setup*", func(w http.ResponseWriter, r *http.Request) {
|
||||
ext := path.Ext(r.URL.Path)
|
||||
if ext == ".html" || ext == "" {
|
||||
data := setupUIBox.Bytes("index.html")
|
||||
data, _ := setupUIBox.Find("index.html")
|
||||
_, _ = w.Write(data)
|
||||
} else {
|
||||
r.URL.Path = strings.Replace(r.URL.Path, "/setup", "", 1)
|
||||
@@ -193,7 +193,7 @@ func Start() {
|
||||
r.HandleFunc("/*", func(w http.ResponseWriter, r *http.Request) {
|
||||
ext := path.Ext(r.URL.Path)
|
||||
if ext == ".html" || ext == "" {
|
||||
data := uiBox.Bytes("index.html")
|
||||
data, _ := uiBox.Find("index.html")
|
||||
_, _ = w.Write(data)
|
||||
} else {
|
||||
http.FileServer(uiBox).ServeHTTP(w, r)
|
||||
|
||||
Reference in New Issue
Block a user