feat: make /last also use new template

This commit is contained in:
jabuxas 2024-10-16 23:20:14 -03:00
parent c32a459147
commit eda09669f8

View File

@ -104,7 +104,7 @@ func (app *Application) lastUploadedHandler(w http.ResponseWriter, r *http.Reque
http.Error(w, "No new files uploaded yet", http.StatusNotFound) http.Error(w, "No new files uploaded yet", http.StatusNotFound)
return return
} }
http.ServeFile(w, r, app.lastUploadedFile) DisplayFile(app, "/"+app.lastUploadedFile, w)
} }
func (app *Application) uploadHandler(w http.ResponseWriter, r *http.Request) { func (app *Application) uploadHandler(w http.ResponseWriter, r *http.Request) {