omgnetwork / ewallet

eWallet Backend for the OmiseGO SDKs.
https://omisego.network/
Apache License 2.0
324 stars 74 forks source link

Membership controller does not return a paginated list #539

Closed T-Dnzt closed 5 years ago

jarindr commented 5 years ago

request

{
  "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
  "per_page": 10,
  "match_any": [
    {
      "field": "user.id",
      "comparator": "contains",
      "value": ""
    },
    {
      "field": "user.username",
      "comparator": "contains",
      "value": ""
    },
    {
      "field": "user.email",
      "comparator": "contains",
      "value": ""
    },
    {
      "field": "role.name",
      "comparator": "contains",
      "value": ""
    }
  ],
  "sort_by": "created_at",
  "sort_dir": "desc"
}

response

{
  "version": "1",
  "success": true,
  "data": {
    "object": "list",
    "data": [
      {
        "username": null,
        "updated_at": "2018-11-20T04:56:35.421129Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqqmba8y03cjrpwt1d7peh3",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqqmba8y03cjrpwt1d7peh3",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "sdasdasd@gmail.com",
        "created_at": "2018-11-20T04:56:35.403198Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T04:53:02.867504Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqqdvr1nxbf1vg9vmz39fcn",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqqdvr1nxbf1vg9vmz39fcn",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "zxczxc@!gmail.com",
        "created_at": "2018-11-20T04:53:02.849252Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T05:03:01.379795Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqr047k3ebav7asx3m0qarh",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqr047k3ebav7asx3m0qarh",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "21312wqeqwe@gasdasd",
        "created_at": "2018-11-20T05:03:01.363175Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T05:06:32.647429Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqr6jh5146jrgd38ss3c1py",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqr6jh5146jrgd38ss3c1py",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "asdasdad@gmail.com",
        "created_at": "2018-11-20T05:06:32.616522Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T05:02:49.576436Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqqzrp2dy83mntspm3hnnnz",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqqzrp2dy83mntspm3hnnnz",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "21312wqeqwe@g",
        "created_at": "2018-11-20T05:02:49.540424Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T05:11:00.460407Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqrer2zx9prqgt56btxdfxs",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqrer2zx9prqgt56btxdfxs",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "zbc@co.",
        "created_at": "2018-11-20T05:11:00.448004Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T04:58:21.015144Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqqqjdw8fjpjjhevsh6x74z",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqqqjdw8fjpjjhevsh6x74z",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "qwewqeqweqwe@gmail.com",
        "created_at": "2018-11-20T04:58:20.990004Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T05:00:47.276581Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqqw18awn9w6cd26jss3pwd",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqqw18awn9w6cd26jss3pwd",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "qweqweq@gmail.com",
        "created_at": "2018-11-20T05:00:47.246503Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T04:54:06.656679Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqqft1g06fb5jxz38yph1a0",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqqft1g06fb5jxz38yph1a0",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "fu@mail.com",
        "created_at": "2018-11-20T04:54:06.640885Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T05:10:50.564212Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqreecw84d0z3e30txsg5dr",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqreecw84d0z3e30txsg5dr",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "zdadasd@gmail.com",
        "created_at": "2018-11-20T05:10:50.526334Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-19T09:33:49.676351Z",
        "status": "active",
        "socket_topic": "user:usr_01cwnn38qc3a8wg7kmqxas9rsb",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwnn38qc3a8wg7kmqxas9rsb",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "jarindr@omise.co",
        "created_at": "2018-11-19T09:33:49.676336Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "admin",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T04:48:43.465139Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqq5ydm9t90cgksv1nrd0b6",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqq5ydm9t90cgksv1nrd0b6",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "zxczczxc@gmail.com",
        "created_at": "2018-11-20T04:48:43.444866Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "admin",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T04:52:30.251864Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqqcvpxt2mbn1rd6hqf31wp",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqqcvpxt2mbn1rd6hqf31wp",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "fu@gmail.com",
        "created_at": "2018-11-20T04:52:30.060514Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T04:47:34.173115Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqq3tqkbwx0j38fr6jzjsbr",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqq3tqkbwx0j38fr6jzjsbr",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "asdasd@gmail.com",
        "created_at": "2018-11-20T04:47:34.131618Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      },
      {
        "username": null,
        "updated_at": "2018-11-20T05:11:19.030044Z",
        "status": "pending_confirmation",
        "socket_topic": "user:usr_01cwqrfa77jkms453b0wx0xkh2",
        "provider_user_id": null,
        "object": "user",
        "metadata": {},
        "id": "usr_01cwqrfa77jkms453b0wx0xkh2",
        "full_name": null,
        "encrypted_metadata": {},
        "email": "abc@gmail.com",
        "created_at": "2018-11-20T05:11:19.015099Z",
        "calling_name": null,
        "avatar": {
          "thumb": null,
          "small": null,
          "original": null,
          "large": null
        },
        "account_role": "viewer",
        "account": {
          "updated_at": "2018-11-19T09:33:49.293952Z",
          "socket_topic": "account:acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "parent_id": null,
          "object": "account",
          "name": "master_account",
          "metadata": {},
          "master": true,
          "id": "acc_01cwnn38b3h4gxsvfm51r2xgtk",
          "encrypted_metadata": {},
          "description": "Master Account",
          "created_at": "2018-11-19T09:33:49.285921Z",
          "category_ids": [],
          "categories": {
            "object": "list",
            "data": []
          },
          "avatar": {
            "thumb": null,
            "small": null,
            "original": null,
            "large": null
          }
        }
      }
    ]
  }
}
T-Dnzt commented 5 years ago

This can't be fixed currently. Hopefully, since memberships shouldn't grow to crazy numbers, we can handle the sorting, etc on the client side. Closing for now, we can reevaluate if the time investment to update this endpoint becomes worth it.