Fixed headers and added endpoints
This commit is contained in:
@ -66,8 +66,8 @@ func (g group) Endpoint(path string, f apiFunc) *group {
|
||||
}
|
||||
|
||||
func StatusAndContent(w http.ResponseWriter, status int, contentType string) {
|
||||
w.WriteHeader(status)
|
||||
w.Header().Add("Content-Type", contentType)
|
||||
w.WriteHeader(status)
|
||||
}
|
||||
|
||||
func WriteJSON(w http.ResponseWriter, status int, v any) error {
|
||||
|
Reference in New Issue
Block a user