aboutsummaryrefslogtreecommitdiff
path: root/pkg/handler/rate/handler.go
blob: 1a2ecf35d891388c2d5785d76f4cf8eb46bc7ca0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package rate

import (
	"github.com/labstack/echo/v4"
	"github.com/uptrace/bun"
)

type Handler struct {
	db *bun.DB
}

// NewHandler returns new Handler.
func NewHandler(db *bun.DB) *Handler {
	return &Handler{db: db}
}

func (h *Handler) Register(g *echo.Group) {
	g.POST("/:id", h.Rate)
}