Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 76c0328

Browse files
authored
remove checking space in update function payload (#367)
1 parent 7e0ba05 commit 76c0328

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

httpapi/error.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,3 @@ type ErrMalformedJSON Error
1919
func NewErrMalformedJSON(err error) *ErrMalformedJSON {
2020
return &ErrMalformedJSON{fmt.Sprintf("Malformed JSON payload: %s.", err.Error())}
2121
}
22-
23-
// ErrSpaceMismatch occurs when function couldn't been found in the discovery.
24-
type ErrSpaceMismatch struct{}
25-
26-
func (e ErrSpaceMismatch) Error() string {
27-
return "Object space doesn't match space specified in the URL."
28-
}

httpapi/httpapi.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,6 @@ func (h HTTPAPI) updateFunction(w http.ResponseWriter, r *http.Request, params h
120120
return
121121
}
122122

123-
if params.ByName("space") != fn.Space {
124-
w.WriteHeader(http.StatusBadRequest)
125-
responseErr := &ErrSpaceMismatch{}
126-
encoder.Encode(&Response{Errors: []Error{{Message: responseErr.Error()}}})
127-
return
128-
}
129-
130123
fn.ID = function.ID(params.ByName("id"))
131124
output, err := h.Functions.UpdateFunction(params.ByName("space"), fn)
132125
if err != nil {

0 commit comments

Comments
 (0)