diff --git a/internal/http/handlers.go b/internal/http/handlers.go index abb8bd2..4887aac 100644 --- a/internal/http/handlers.go +++ b/internal/http/handlers.go @@ -210,6 +210,7 @@ func (h *UploadHandlers) Delete(w http.ResponseWriter, r *http.Request) { h.logDelete.Printf("| %s | %s | %s | %s", r.Header.Get("X-Real-IP"), netTyp, saltedHash, r.UserAgent()) w.WriteHeader(http.StatusNoContent) + web.Deleted(utils.MainSite(r.Host), site) } func NotFound(w http.ResponseWriter, r *http.Request) { diff --git a/web/templates/deleted.jade b/web/templates/deleted.jade new file mode 100644 index 0000000..d7eb0a5 --- /dev/null +++ b/web/templates/deleted.jade @@ -0,0 +1,11 @@ +extends base.jade + +block header + h1 Deleted + +block body + :go:func Deleted(mainSite, site string) + section + h2 File was successfully deleted. + center + a(href="/") Back to index page diff --git a/web/web.go b/web/web.go index 1d2f60f..4348286 100644 --- a/web/web.go +++ b/web/web.go @@ -8,6 +8,7 @@ import ( //go:generate $GOPATH/bin/jade -pkg=web -stdbuf -stdlib -writer templates/index.jade //go:generate $GOPATH/bin/jade -pkg=web -stdbuf -stdlib -writer templates/nospace.jade +//go:generate $GOPATH/bin/jade -pkg=web -stdbuf -stdlib -writer templates/deleted.jade //go:generate $GOPATH/bin/jade -pkg=web -stdbuf -stdlib -writer templates/uploaded.jade //go:generate $GOPATH/bin/jade -pkg=web -stdbuf -stdlib -writer templates/error404.jade