decord/source/modules/harvester/DataHarvestActionCreators.tsx

39 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 13817
// Function ID: 105907
2026-07-20 16:05:17 +00:00
// Name: getDataHarvestStatus
2026-07-24 07:16:23 +00:00
// Dependencies: [653, 686, 507, 9266, 2]
2026-07-20 16:05:17 +00:00
// Exports: getDataHarvestStatus, requestDataHarvest
2026-07-24 07:16:23 +00:00
// Module 13817 (getDataHarvestStatus)
2026-07-23 10:11:24 +00:00
import { Endpoints } from "ME";
const result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/harvester/DataHarvestActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const getDataHarvestStatus = function getDataHarvestStatus() {
2026-07-23 10:11:24 +00:00
let obj = importDefault(686);
2026-07-20 16:05:17 +00:00
obj.dispatch({ type: "LOAD_DATA_HARVEST_TYPE_START" });
2026-07-23 10:11:24 +00:00
const HTTP = require(507) /* _isNativeReflectConstruct */.HTTP;
obj = { url: Endpoints.USER_HARVEST, oldFormErrors: true, rejectWithError: false };
2026-07-20 16:05:17 +00:00
const value = HTTP.get(obj);
return value.then((body) => {
2026-07-23 10:11:24 +00:00
let obj = outer1_1(outer1_2[1]);
2026-07-20 16:05:17 +00:00
obj = { type: "UPDATE_DATA_HARVEST_TYPE", harvestType: body.body };
obj.dispatch(obj);
}).catch((error) => {
2026-07-23 10:11:24 +00:00
let obj = outer1_1(outer1_2[1]);
2026-07-20 16:05:17 +00:00
obj = { type: "LOAD_DATA_HARVEST_TYPE_FAILURE", error };
obj.dispatch(obj);
});
};
export const requestDataHarvest = function requestDataHarvest(mapped) {
2026-07-24 07:16:23 +00:00
const harvest = require(9266) /* saveProfileAndAccountRequest */.requestHarvest(mapped);
2026-07-20 16:05:17 +00:00
return harvest.then((body) => {
if (tmp) {
2026-07-23 10:11:24 +00:00
let obj = outer1_1(outer1_2[1]);
2026-07-20 16:05:17 +00:00
obj = { type: "UPDATE_DATA_HARVEST_TYPE", harvestType: body.body };
obj.dispatch(obj);
}
return body;
});
};