feat: enable GetMaskedSyncers()

This commit is contained in:
Yang Luo
2024-01-18 20:59:27 +08:00
parent a681c267b3
commit b8db07db4d
2 changed files with 23 additions and 10 deletions

View File

@ -40,7 +40,7 @@ func (c *ApiController) GetSyncers() {
organization := c.Input().Get("organization")
if limit == "" || page == "" {
syncers, err := object.GetOrganizationSyncers(owner, organization)
syncers, err := object.GetMaskedSyncers(object.GetOrganizationSyncers(owner, organization))
if err != nil {
c.ResponseError(err.Error())
return
@ -56,7 +56,7 @@ func (c *ApiController) GetSyncers() {
}
paginator := pagination.SetPaginator(c.Ctx, limit, count)
syncers, err := object.GetPaginationSyncers(owner, organization, paginator.Offset(), limit, field, value, sortField, sortOrder)
syncers, err := object.GetMaskedSyncers(object.GetPaginationSyncers(owner, organization, paginator.Offset(), limit, field, value, sortField, sortOrder))
if err != nil {
c.ResponseError(err.Error())
return
@ -76,7 +76,7 @@ func (c *ApiController) GetSyncers() {
func (c *ApiController) GetSyncer() {
id := c.Input().Get("id")
syncer, err := object.GetSyncer(id)
syncer, err := object.GetMaskedSyncer(object.GetSyncer(id))
if err != nil {
c.ResponseError(err.Error())
return