Files
hnh-map/internal/app/handlers/response.go
Nikolay Tatarinov 6529d7370e Add configuration files and update project documentation
- Introduced .editorconfig for consistent coding styles across the project.
- Added .golangci.yml for Go linting configuration.
- Updated AGENTS.md to clarify project structure and components.
- Enhanced CONTRIBUTING.md with Makefile usage for common tasks.
- Updated Dockerfiles to use Go 1.24 and improved build instructions.
- Refined README.md and deployment documentation for clarity.
- Added testing documentation in testing.md for backend and frontend tests.
- Introduced Makefile for streamlined development commands and tasks.
2026-03-01 01:51:47 +03:00

17 lines
426 B
Go

package handlers
import (
"github.com/andyleap/hnh-map/internal/app/response"
"net/http"
)
// JSON writes v as JSON with the given status code.
func JSON(rw http.ResponseWriter, status int, v any) {
response.JSON(rw, status, v)
}
// JSONError writes an error response in standard format.
func JSONError(rw http.ResponseWriter, status int, msg, code string) {
response.JSONError(rw, status, msg, code)
}