bitwarden / cli

The command line vault (Windows, macOS, & Linux).
https://bitwarden.com
GNU General Public License v3.0
1.62k stars 174 forks source link

parse incoming JSON date strings as Date objects #500

Closed kspearrin closed 2 years ago

kspearrin commented 2 years ago

Type of change

Objective

When parsing Send request object JSON, date fields will be received as strings. The SendResponse object expects them to be Date objects. This is manually handled when parsing the JSON in SendResponse.fromJson(), however, since Koa.js parses the JSON string into an object for us when using serve, we need to manually correct this.

Ideally, we need to move away from the SendResponse object for sends. It seems this object has been abused and is not appropriate for CLI request objects.

Code changes

Testing requirements

Repeat test procedures from https://app.asana.com/0/1153294014282570/1201747502562147

Before you submit