mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
apply/make Travis's json-format branch prototype to work with latest restructured master; added StatusCode to JSONOutput server-function contract
This commit is contained in:
committed by
Denis Makogon
parent
b8d7154747
commit
b6b9b55ca9
@@ -18,6 +18,8 @@ const (
|
||||
FormatDefault = "default"
|
||||
// FormatHTTP ...
|
||||
FormatHTTP = "http"
|
||||
// FormatJSON ...
|
||||
FormatJSON = "json"
|
||||
)
|
||||
|
||||
var possibleStatuses = [...]string{"delayed", "queued", "running", "success", "error", "cancelled"}
|
||||
|
||||
@@ -95,7 +95,7 @@ func (r *Route) Validate() error {
|
||||
return ErrRoutesInvalidType
|
||||
}
|
||||
|
||||
if r.Format != FormatDefault && r.Format != FormatHTTP {
|
||||
if r.Format != FormatDefault && r.Format != FormatHTTP && r.Format != FormatJSON {
|
||||
return ErrRoutesInvalidFormat
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user