mirror of
https://github.com/niusmallnan/steve.git
synced 2025-09-09 00:50:05 +00:00
Add userpreferences
This commit is contained in:
@@ -50,7 +50,7 @@ func (r *RawResource) MarshalJSON() ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if len(data) < 2 || data[0] != '{' || data[len(data)-1] != '}' {
|
||||
if len(data) < 3 || data[0] != '{' || data[len(data)-1] != '}' {
|
||||
return outer, nil
|
||||
}
|
||||
|
||||
@@ -288,3 +288,8 @@ func FormatterChain(formatter Formatter, next Formatter) Formatter {
|
||||
next(request, resource)
|
||||
}
|
||||
}
|
||||
|
||||
func (r *APIRequest) Clone() *APIRequest {
|
||||
clone := *r
|
||||
return &clone
|
||||
}
|
||||
|
Reference in New Issue
Block a user