mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-26 13:48:53 +08:00
NOISSUE - Fix HTTP header for Things and Channels creation (#939)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
This commit is contained in:
parent
3bfdcfe83c
commit
841b943718
@ -55,8 +55,8 @@ func (res thingRes) Code() int {
|
||||
func (res thingRes) Headers() map[string]string {
|
||||
if res.created {
|
||||
return map[string]string{
|
||||
"Location": fmt.Sprintf("/things/%s", res.ID),
|
||||
"Warning Depreciated": "This endpoint will be depreciated in 0.11.0. It will be replaced with the bulk endpoint currently found at /things/bulk.",
|
||||
"Location": fmt.Sprintf("/things/%s", res.ID),
|
||||
"Warning-Deprecated": "This endpoint will be depreciated in 0.11.0. It will be replaced with the bulk endpoint currently found at /things/bulk.",
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,8 +143,8 @@ func (res channelRes) Code() int {
|
||||
func (res channelRes) Headers() map[string]string {
|
||||
if res.created {
|
||||
return map[string]string{
|
||||
"Location": fmt.Sprintf("/channels/%s", res.ID),
|
||||
"Warning Depreciated": "This endpoint will be depreciated in 0.11.0. It will be replaced with the bulk endpoint currently found at /channels/bulk.",
|
||||
"Location": fmt.Sprintf("/channels/%s", res.ID),
|
||||
"Warning-Deprecated": "This endpoint will be depreciated in 0.11.0. It will be replaced with the bulk endpoint currently found at /channels/bulk.",
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user