about summary refs log tree commit diff
path: root/src/rest-api/handler/handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/rest-api/handler/handler.go')
-rw-r--r--src/rest-api/handler/handler.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rest-api/handler/handler.go b/src/rest-api/handler/handler.go
index c904ff4..b9bb80e 100644
--- a/src/rest-api/handler/handler.go
+++ b/src/rest-api/handler/handler.go
@@ -16,14 +16,14 @@ type Handler struct {
 	queueName string
 }
 
-func NewHandler(ch *amqp.Channel, queueName string) *Handler {
-	return &Handler{
+func NewHandler(ch *amqp.Channel, queueName string) Handler {
+	return Handler{
 		ch:        ch,
 		queueName: queueName,
 	}
 }
 
-func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 	bytes, err := io.ReadAll(io.Reader(r.Body))
 	if err != nil {
 		log.Fatal(err)