package adminhandler

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("/admins")

	//nolint:gocritic
	//r.POST("/", h.Add).Name = "admin-addkindboxreq"
	r.POST("/register", h.Register, middleware.Auth(h.authSvc), middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminAdminRegisterPermission))
	r.POST("/login-by-phone", h.LoginByPhoneNumber)
	r.POST("/refresh-access", h.RefreshAccess)
	r.GET("/profile", h.Profile, middleware.Auth(h.authSvc))
	//nolint:gocritic
	//r.PATCH("/:id", h.Update).Name = "admin-updatekindboxreq"
}
