|
|
@ -131,7 +131,7 @@ func RegisterAssociationProductFamily(party router.Party, path string, method fu |
|
|
|
* @Date : 2021-10-19 14:04:53 |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func RegisterIDOfProductFamily(party router.Party, httpMethod string, path string, method func(*global.User, string) error) { |
|
|
|
func RegisterIDOfProductFamily(party router.Party, httpMethod string, path string, method func(*global.User, string, string) error) { |
|
|
|
|
|
|
|
party.Handle(httpMethod, path, func(ctx iris.Context) { |
|
|
|
user, ok := jwts.ParseToken(ctx) |
|
|
@ -142,8 +142,8 @@ func RegisterIDOfProductFamily(party router.Party, httpMethod string, path strin |
|
|
|
|
|
|
|
var err error = nil |
|
|
|
productFamilyId := ctx.Params().GetString("productFamilyId") |
|
|
|
|
|
|
|
err = method(user, productFamilyId) |
|
|
|
projectId := ctx.Params().GetString("projectId") |
|
|
|
err = method(user, productFamilyId, projectId) |
|
|
|
if err != nil { |
|
|
|
supports.Error(ctx, iris.StatusBadRequest, err.Error(), nil) |
|
|
|
return |
|
|
@ -193,9 +193,9 @@ func RegisterInsertOneProductFamily(party router.Party, path string, method func |
|
|
|
* @Date : 2021-10-19 14:04:53 |
|
|
|
* |
|
|
|
******************************************************************************/ |
|
|
|
func RegisterDeleteOneProductFamily(party router.Party, path string, method func(*global.User, string) error) { |
|
|
|
func RegisterDeleteOneProductFamily(party router.Party, path string, method func(*global.User, string, string) error) { |
|
|
|
|
|
|
|
RegisterIDOfProductFamily(party, "DELETE", path+"/{productFamilyId:string}", method) |
|
|
|
RegisterIDOfProductFamily(party, "DELETE", path+"/{projectId:string}/{productFamilyId:string}", method) |
|
|
|
} |
|
|
|
|
|
|
|
/****************************************************************************** |
|
|
|