mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
parse incoming JSON date strings as Date objects (#500)
* parse incoming JSON date strings as Date objects * update create command too
This commit is contained in:
@@ -31,6 +31,8 @@ export class SendCreateCommand {
|
|||||||
|
|
||||||
if (typeof requestJson !== "string") {
|
if (typeof requestJson !== "string") {
|
||||||
req = requestJson;
|
req = requestJson;
|
||||||
|
req.deletionDate = req.deletionDate == null ? null : new Date(req.deletionDate);
|
||||||
|
req.expirationDate = req.expirationDate == null ? null : new Date(req.expirationDate);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const reqJson = Buffer.from(requestJson, "base64").toString();
|
const reqJson = Buffer.from(requestJson, "base64").toString();
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ export class SendEditCommand {
|
|||||||
let req: SendResponse = null;
|
let req: SendResponse = null;
|
||||||
if (typeof requestJson !== "string") {
|
if (typeof requestJson !== "string") {
|
||||||
req = requestJson;
|
req = requestJson;
|
||||||
|
req.deletionDate = req.deletionDate == null ? null : new Date(req.deletionDate);
|
||||||
|
req.expirationDate = req.expirationDate == null ? null : new Date(req.expirationDate);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const reqJson = Buffer.from(requestJson, "base64").toString();
|
const reqJson = Buffer.from(requestJson, "base64").toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user