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, h.authConfig), middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminAdminRegisterPermission))
	r.POST("/login-by-phone", h.LoginByPhoneNumber)
	//nolint:gocritic
	//r.PATCH("/:id", h.Update).Name = "admin-updatekindboxreq"
	r.GET("/agents", h.GetAllAgent, middleware.Auth(h.authSvc, h.authConfig), middleware.AdminAuthorization(h.adminAuthorizeSvc, entity.AdminAdminGetAllAgentPermission))
}
