~yerinalexey/gobin

2c2abcab2ed755c1869e66b2c7ef8ff2dba9d15b — Alexey Yerin 11 months ago af3b43d
fix: return 404 on invalid request param
1 files changed, 2 insertions(+), 2 deletions(-)

M main.go
M main.go => main.go +2 -2
@@ 88,8 88,8 @@ func main() {
		id, err := strconv.Atoi(vars["id"])

		if err != nil {
			// TODO: Add proper 400 page
			w.WriteHeader(400)
			w.WriteHeader(404)
			tmpl.ExecuteTemplate(w, "not-found", nil)

			return
		}