This commit is contained in:
7
main.go
7
main.go
@@ -161,11 +161,11 @@ func main() {
|
||||
log.Printf("Request: %+v, fileName:%s, method: %s", pth, fileName, r.Method)
|
||||
folder, err := app.GetOrSpawn(pth)
|
||||
if err != nil {
|
||||
if err != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
w.Write([]byte(err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
if fileName == "" {
|
||||
authKey := r.Header.Get("Authorization")
|
||||
@@ -210,7 +210,6 @@ func main() {
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
}
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
})
|
||||
if err := http.ListenAndServe(":8080", mux); err != nil {
|
||||
panic(err)
|
||||
|
||||
Reference in New Issue
Block a user