You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
631 B
18 lines
631 B
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.parseRestoreInfo = void 0;
|
|
exports.parseRestoreInfo = (originalRestoreInfo) => {
|
|
let tempRestoreInfo;
|
|
if (originalRestoreInfo) {
|
|
tempRestoreInfo = {
|
|
ongoingRequest: originalRestoreInfo.includes('true')
|
|
};
|
|
if (!tempRestoreInfo.ongoingRequest) {
|
|
const matchArray = originalRestoreInfo.match(/expiry-date="(.*)"/);
|
|
if (matchArray && matchArray[1]) {
|
|
tempRestoreInfo.expiryDate = new Date(matchArray[1]);
|
|
}
|
|
}
|
|
}
|
|
return tempRestoreInfo;
|
|
};
|
|
|