bug: manager-api supported `POST` method for consumer
Bug report
Describe the bug
manager-api supported POST method for consumer.
but it should not support the POST method for consumer, the same as APISIX's adminapi.
{
caseDesc: "create consumers with post method",
Object: MangerApiExpect(t),
Path: "/apisix/admin/consumers",
Method: http.MethodPost,
Body: `{
"username":"case_9",
"desc": "new consumer",
"create_time": 1602883670,
"update_time": 1602893670
}`,
Headers: map[string]string{"Authorization": token},
ExpectStatus: http.StatusMethodNotAllowed,
},
Hi, @idbeta. I had lookup the code in apisix-dashboard and apisix.
apisix will return 405 and not supported POST method for consumer
apisix-dashboard will create a new consumer.
So I think apisix-dashboard should forbid POST and merge Create and Update into a function which was called byPUT method.
The frontend will use put instead of post now.
So I think apisix-dashboard should forbid
POSTand mergeCreate and Updateinto a function which was called byPUTmethod.
agree with this. @starsz would like to fix this issue?
So I think apisix-dashboard should forbid
POSTand mergeCreate and Updateinto a function which was called byPUTmethod.agree with this. @starsz would like to fix this issue?
My pleasure, please assign to me.