Set header for share type when not specified
This commit is contained in:
parent
f5a238bccb
commit
5ae5461eab
1 changed files with 2 additions and 0 deletions
|
@ -128,6 +128,7 @@ func (sa *shareAPI) routeShare(w http.ResponseWriter, r *http.Request) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var rType ShareRequestType
|
var rType ShareRequestType
|
||||||
|
|
||||||
if params.Type != nil {
|
if params.Type != nil {
|
||||||
rType = ShareRequestType(*params.Type)
|
rType = ShareRequestType(*params.Type)
|
||||||
} else {
|
} else {
|
||||||
|
@ -138,6 +139,7 @@ func (sa *shareAPI) routeShare(w http.ResponseWriter, r *http.Request) {
|
||||||
case shares.EntityIncident:
|
case shares.EntityIncident:
|
||||||
rType = ShareRequestIncident
|
rType = ShareRequestIncident
|
||||||
}
|
}
|
||||||
|
w.Header().Set("X-Share-Type", string(rType))
|
||||||
}
|
}
|
||||||
|
|
||||||
if !rType.IsValid() {
|
if !rType.IsValid() {
|
||||||
|
|
Loading…
Reference in a new issue