Rename default to primary because typescript
This commit is contained in:
committed by
Jože Fortun
parent
bd59d58e98
commit
175a597de2
@@ -587,7 +587,7 @@ endpoints:
|
||||
required: false
|
||||
title: Parent ID
|
||||
- type: bool
|
||||
name: default
|
||||
name: primary
|
||||
required: false
|
||||
title: Default layouts
|
||||
- type: string
|
||||
|
||||
@@ -58,10 +58,10 @@ type (
|
||||
// Parent ID
|
||||
ParentID uint64 `json:",string"`
|
||||
|
||||
// Default GET parameter
|
||||
// Primary GET parameter
|
||||
//
|
||||
// Default layouts
|
||||
Default bool
|
||||
Primary bool
|
||||
|
||||
// Query GET parameter
|
||||
//
|
||||
@@ -321,7 +321,7 @@ func (r PageLayoutList) Auditable() map[string]interface{} {
|
||||
"pageID": r.PageID,
|
||||
"moduleID": r.ModuleID,
|
||||
"parentID": r.ParentID,
|
||||
"default": r.Default,
|
||||
"primary": r.Primary,
|
||||
"query": r.Query,
|
||||
"handle": r.Handle,
|
||||
"labels": r.Labels,
|
||||
@@ -352,8 +352,8 @@ func (r PageLayoutList) GetParentID() uint64 {
|
||||
}
|
||||
|
||||
// Auditable returns all auditable/loggable parameters
|
||||
func (r PageLayoutList) GetDefault() bool {
|
||||
return r.Default
|
||||
func (r PageLayoutList) GetPrimary() bool {
|
||||
return r.Primary
|
||||
}
|
||||
|
||||
// Auditable returns all auditable/loggable parameters
|
||||
@@ -405,8 +405,8 @@ func (r *PageLayoutList) Fill(req *http.Request) (err error) {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if val, ok := tmp["default"]; ok && len(val) > 0 {
|
||||
r.Default, err = payload.ParseBool(val[0]), nil
|
||||
if val, ok := tmp["primary"]; ok && len(val) > 0 {
|
||||
r.Primary, err = payload.ParseBool(val[0]), nil
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
+3
-3
@@ -113,7 +113,7 @@ func (p pageLayoutActionProps) Serialize() actionlog.Meta {
|
||||
if p.filter != nil {
|
||||
m.Set("filter.query", p.filter.Query, true)
|
||||
m.Set("filter.handle", p.filter.Handle, true)
|
||||
m.Set("filter.default", p.filter.Default, true)
|
||||
m.Set("filter.primary", p.filter.Primary, true)
|
||||
m.Set("filter.namespaceID", p.filter.NamespaceID, true)
|
||||
m.Set("filter.sort", p.filter.Sort, true)
|
||||
m.Set("filter.limit", p.filter.Limit, true)
|
||||
@@ -197,7 +197,7 @@ func (p pageLayoutActionProps) Format(in string, err error) string {
|
||||
fns(
|
||||
p.filter.Query,
|
||||
p.filter.Handle,
|
||||
p.filter.Default,
|
||||
p.filter.Primary,
|
||||
p.filter.NamespaceID,
|
||||
p.filter.Sort,
|
||||
p.filter.Limit,
|
||||
@@ -205,7 +205,7 @@ func (p pageLayoutActionProps) Format(in string, err error) string {
|
||||
)
|
||||
pairs = append(pairs, "{{filter.query}}", fns(p.filter.Query))
|
||||
pairs = append(pairs, "{{filter.handle}}", fns(p.filter.Handle))
|
||||
pairs = append(pairs, "{{filter.default}}", fns(p.filter.Default))
|
||||
pairs = append(pairs, "{{filter.primary}}", fns(p.filter.Primary))
|
||||
pairs = append(pairs, "{{filter.namespaceID}}", fns(p.filter.NamespaceID))
|
||||
pairs = append(pairs, "{{filter.sort}}", fns(p.filter.Sort))
|
||||
pairs = append(pairs, "{{filter.limit}}", fns(p.filter.Limit))
|
||||
|
||||
@@ -21,7 +21,7 @@ props:
|
||||
fields: [ handle, ID, namespaceID, moduleID, blocks ]
|
||||
- name: filter
|
||||
type: "*types.PageLayoutFilter"
|
||||
fields: [ query, handle, default, namespaceID, sort, limit ]
|
||||
fields: [ query, handle, primary, namespaceID, sort, limit ]
|
||||
- name: namespace
|
||||
type: "*types.Namespace"
|
||||
fields: [ slug, ID ]
|
||||
|
||||
@@ -70,7 +70,7 @@ type (
|
||||
NamespaceID uint64 `json:"namespaceID,string"`
|
||||
PageID uint64 `json:"pageID,string,omitempty"`
|
||||
ModuleID uint64 `json:"moduleID,string,omitempty"`
|
||||
Default bool `json:"default,omitempty"`
|
||||
Primary bool `json:"primary,omitempty"`
|
||||
Handle string `json:"handle"`
|
||||
Name string `json:"name"`
|
||||
Query string `json:"query"`
|
||||
|
||||
Reference in New Issue
Block a user