diff --git a/app/constants/common/common.go b/app/constants/common/common.go index 693b7e2..a3a296b 100644 --- a/app/constants/common/common.go +++ b/app/constants/common/common.go @@ -3,4 +3,5 @@ package common const ( TOKEN_PRE = "player_token_" TOKEN_Admin = "Admin_token_" + ADMIN_V1 = "/admin/api/v1" ) diff --git a/app/http/requestmapping/backend.go b/app/http/requestmapping/backend.go index 0467ec8..f85dbf3 100644 --- a/app/http/requestmapping/backend.go +++ b/app/http/requestmapping/backend.go @@ -1,12 +1,13 @@ package requestmapping import ( + "qteam/app/constants/common" "qteam/app/http/entities/backend" ) var BackendRequestMap = map[string]func() interface{}{ - "/admin/api/v1/product/create": func() interface{} { + common.ADMIN_V1 + "/product/create": func() interface{} { return new(backend.ProductCreateRequest) }, }