modernize ocshared
This commit is contained in:
@@ -45,7 +45,7 @@ func (o *CollaborativeAreaController) Search() {
|
||||
// store and return Id or post with UUID
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).Search(nil, search, isDraft == "true", 0, 10000)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ func (o *CollaborativeAreaController) Post() {
|
||||
func (o *CollaborativeAreaController) GetAll() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadAll(isDraft == "true")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.COLLABORATIVE_AREA), user, peerID, groups, nil).LoadAll(isDraft == "true", 0, 10000)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ func (o *RuleController) Search() {
|
||||
// store and return Id or post with UUID
|
||||
search := o.Ctx.Input.Param(":search")
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).Search(nil, search, isDraft == "true")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).Search(nil, search, isDraft == "true", 0, 10000)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ func (o *RuleController) Post() {
|
||||
func (o *RuleController) GetAll() {
|
||||
user, peerID, groups := oclib.ExtractTokenInfo(*o.Ctx.Request)
|
||||
isDraft := o.Ctx.Input.Query("is_draft")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).LoadAll(isDraft == "true")
|
||||
o.Data["json"] = oclib.NewRequest(oclib.LibDataEnum(oclib.RULE), user, peerID, groups, nil).LoadAll(isDraft == "true", 0, 10000)
|
||||
o.ServeJSON()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user