rewrite to using new method

This commit is contained in:
2024-06-16 18:21:06 -05:00
parent f07bd666fb
commit 790c8c969a
19 changed files with 388 additions and 395 deletions

12
middleware/headers.go Normal file
View File

@@ -0,0 +1,12 @@
package middleware
import "net/http"
func Headers(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
next.ServeHTTP(w, r)
})
}