forked from ebhomengo/niki
20 lines
634 B
Go
20 lines
634 B
Go
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)
|
|
//nolint:gocritic
|
|
//r.PATCH("/:id", h.Update).Name = "admin-updatekindboxreq"
|
|
}
|