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:
parent
f1c1ab38ad
commit
2295cd3266
|
@ -31,6 +31,8 @@ export class SendCreateCommand {
|
|||
|
||||
if (typeof requestJson !== "string") {
|
||||
req = requestJson;
|
||||
req.deletionDate = req.deletionDate == null ? null : new Date(req.deletionDate);
|
||||
req.expirationDate = req.expirationDate == null ? null : new Date(req.expirationDate);
|
||||
} else {
|
||||
try {
|
||||
const reqJson = Buffer.from(requestJson, "base64").toString();
|
||||
|
|
|
@ -27,6 +27,8 @@ export class SendEditCommand {
|
|||
let req: SendResponse = null;
|
||||
if (typeof requestJson !== "string") {
|
||||
req = requestJson;
|
||||
req.deletionDate = req.deletionDate == null ? null : new Date(req.deletionDate);
|
||||
req.expirationDate = req.expirationDate == null ? null : new Date(req.expirationDate);
|
||||
} else {
|
||||
try {
|
||||
const reqJson = Buffer.from(requestJson, "base64").toString();
|
||||
|
|
Loading…
Reference in New Issue