analuizaff
2 years ago
16 changed files with 242 additions and 72 deletions
-
70src/App.js
-
7src/app.json
-
30src/app/api/Ingestion/sendFormAnswer.js
-
BINsrc/app/assets/appLogo.png
-
25src/app/components/forms/AssembleIngestionObject.js
-
2src/app/screens/AccountScreen.js
-
2src/app/screens/MapFeedScreen.js
-
2src/app/screens/MapFormScreen.js
-
2src/app/screens/PluviometerRegisterScreen.js
-
10src/app/screens/PluviometerSharingDataScreen.js
-
53src/app/screens/RainSharingDataScreen.js
-
17src/app/screens/RiverFloodSharingDataScreen.js
-
16src/app/screens/SharingDataScreen.js
-
21src/app/screens/SharingFloodZonesScreen.js
-
39src/app/utility/cache.js
-
18src/eas.json
@ -1,15 +1,25 @@ |
|||
import appIngestion from "./appIngestion"; |
|||
|
|||
import cache from "../../utility/cache"; |
|||
const endpoint = "/api/wpdAppIngestion?"; |
|||
|
|||
async function sendFormAnswer(ingestionObject) { |
|||
// console.log(JSON.stringify(ingestionObject));
|
|||
|
|||
const response = await appIngestion.post( |
|||
endpoint, |
|||
JSON.stringify(ingestionObject) |
|||
); |
|||
return response; |
|||
} |
|||
async function sendFormAnswer(ingestionObject, connection, formName) { |
|||
if (connection) { |
|||
const response = await appIngestion.post( |
|||
endpoint, |
|||
JSON.stringify(ingestionObject) |
|||
); |
|||
return response; |
|||
} else { |
|||
const formArray = []; |
|||
const teste = await cache.get("sendforms"); |
|||
if (teste) { |
|||
var object = JSON.parse(teste); |
|||
object.forEach((element) => formArray.push(element)); |
|||
} |
|||
formArray.push(ingestionObject); |
|||
cache.store("sendforms", formArray); |
|||
return { ok: true }; |
|||
} |
|||
} |
|||
|
|||
export default sendFormAnswer; |
After Width: 400 | Height: 400 | Size: 72 KiB |
@ -0,0 +1,18 @@ |
|||
{ |
|||
"cli": { |
|||
"version": ">= 0.40.0" |
|||
}, |
|||
"build": { |
|||
"development": { |
|||
"developmentClient": true, |
|||
"distribution": "internal" |
|||
}, |
|||
"preview": { |
|||
"distribution": "internal" |
|||
}, |
|||
"production": {} |
|||
}, |
|||
"submit": { |
|||
"production": {} |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue