MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / processStatus

Function processStatus

utils/userStatus.js:486–498  ·  view source on GitHub ↗
(statusObj, isEndOfDay)

Source from the content-addressed store, hash-verified

484 */
485const convertTimestampsToUTC = (obj) => {
486 const processStatus = (statusObj, isEndOfDay) => {
487 if (!statusObj || typeof statusObj !== "object") return;
488
489 const { from, until } = statusObj;
490
491 if (from && (typeof from === "string" || typeof from === "number") && String(from).trim() !== "") {
492 statusObj.from = convertTimestampToUTCStartOrEndOfDay(from, false);
493 }
494
495 if (until && (typeof until === "string" || typeof until === "number") && String(until).trim() !== "") {
496 statusObj.until = convertTimestampToUTCStartOrEndOfDay(until, true);
497 }
498 };
499
500 if (Object.prototype.hasOwnProperty.call(obj, "currentStatus")) {
501 processStatus(obj.currentStatus, false);

Callers 1

convertTimestampsToUTCFunction · 0.85

Tested by

no test coverage detected