package benefactoraddresshandler

import (
	"git.gocasts.ir/ebhomengo/niki/delivery/http_server/middleware"
	"git.gocasts.ir/ebhomengo/niki/entity"
	"github.com/labstack/echo/v4"
)

func (h Handler) SetRoutes(e *echo.Echo) {
	r := e.Group("/address")

	r.GET("/provinces", h.GetAllProvinces)
	r.GET("/cities", h.GetAllCities)
	r.POST("/", h.AddAddress, middleware.Auth(h.authSvc, h.authConfig),
		middleware.BenefactorAuthorization(entity.UserBenefactorRole))
}
