@dvsa/appdev-api-common 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/utils/date-time.d.ts
CHANGED
package/utils/date-time.js
CHANGED
|
@@ -269,5 +269,9 @@ class DateTime {
|
|
|
269
269
|
utcOffset: this.instance.utcOffset(),
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
|
+
static formatForDB(dateStr) {
|
|
273
|
+
const date = typeof dateStr === "string" ? new Date(dateStr) : dateStr;
|
|
274
|
+
return date.toISOString().replace("T", " ").replace("Z", "");
|
|
275
|
+
}
|
|
272
276
|
}
|
|
273
277
|
exports.DateTime = DateTime;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Logger } from "@aws-lambda-powertools/logger
|
|
1
|
+
import type { Logger } from "@aws-lambda-powertools/logger";
|
|
2
2
|
import type { NextFunction, Request, Response } from "express";
|
|
3
3
|
/**
|
|
4
4
|
* Middleware to decode base64+gzip encoded request payloads and turn them into their JSON equivalent
|