Deprecate record list filter query param
This commit is contained in:
parent
9dcea4fb79
commit
10e8b77d39
@ -548,10 +548,6 @@ endpoints:
|
||||
type: string
|
||||
required: false
|
||||
title: Record filtering query
|
||||
- name: filter
|
||||
type: string
|
||||
required: false
|
||||
title: Filtering condition (same as query, deprecated)
|
||||
- type: map[string]string
|
||||
name: labels
|
||||
title: Labels
|
||||
|
||||
@ -99,10 +99,6 @@ func (ctrl *Record) List(ctx context.Context, r *request.RecordList) (interface{
|
||||
if r.Query != "" {
|
||||
// Query param takes preference
|
||||
f.Query = r.Query
|
||||
} else if r.Filter != "" {
|
||||
// Backward compatibility
|
||||
// Filter param is deprecated
|
||||
f.Query = r.Filter
|
||||
}
|
||||
|
||||
if f.Paging, err = filter.NewPaging(r.Limit, r.PageCursor); err != nil {
|
||||
|
||||
@ -78,11 +78,6 @@ type (
|
||||
// Record filtering query
|
||||
Query string
|
||||
|
||||
// Filter GET parameter
|
||||
//
|
||||
// Filtering condition (same as query, deprecated)
|
||||
Filter string
|
||||
|
||||
// Labels GET parameter
|
||||
//
|
||||
// Labels
|
||||
@ -526,7 +521,6 @@ func (r RecordList) Auditable() map[string]interface{} {
|
||||
"namespaceID": r.NamespaceID,
|
||||
"moduleID": r.ModuleID,
|
||||
"query": r.Query,
|
||||
"filter": r.Filter,
|
||||
"labels": r.Labels,
|
||||
"deleted": r.Deleted,
|
||||
"limit": r.Limit,
|
||||
@ -552,11 +546,6 @@ func (r RecordList) GetQuery() string {
|
||||
return r.Query
|
||||
}
|
||||
|
||||
// Auditable returns all auditable/loggable parameters
|
||||
func (r RecordList) GetFilter() string {
|
||||
return r.Filter
|
||||
}
|
||||
|
||||
// Auditable returns all auditable/loggable parameters
|
||||
func (r RecordList) GetLabels() map[string]string {
|
||||
return r.Labels
|
||||
@ -605,12 +594,6 @@ func (r *RecordList) Fill(req *http.Request) (err error) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if val, ok := tmp["filter"]; ok && len(val) > 0 {
|
||||
r.Filter, err = val[0], nil
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if val, ok := tmp["labels[]"]; ok {
|
||||
r.Labels, err = label.ParseStrings(val)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user