seamapi / public-tracker

0 stars 0 forks source link

Passing an empty array of `connected_account_ids` to `/devices/list` will return all devices #8

Closed seveibar closed 1 year ago

seveibar commented 1 year ago

Prerequisites

Description

[Description of the issue or feature]

Steps to Reproduce

  1. POST /devices/list with { "connected_account_ids": [] }
  2. All devices on the account will be return

Expected behavior: 400 error invalid parameter connected_account_ids

Additional Information

Note for implementor, most likely can be implemented via a zod validation on the array.

itelo commented 1 year ago

We should look into how Nextlove is validating arrays. There seems to be a validation process in place that works well for POST, but not for GET.