mirror of
https://github.com/bellingcat/auto-archiver-setup-tool.git
synced 2026-06-12 05:28:36 +03:00
@@ -1,16 +1,16 @@
|
|||||||
css/app.5e2586d8.css,1703099799910,a7cc2db0d0fa43a6b784b8a10810b9c04537815354066629625ef7a47ced3858
|
favicon.ico,1707219328531,e6e78a8cf46f74a641d436b48463d7a7e3379ad970793de27a7a190390ed85f1
|
||||||
favicon.ico,1703099799898,e6e78a8cf46f74a641d436b48463d7a7e3379ad970793de27a7a190390ed85f1
|
index.html,1707219328535,dbb8f29b4516cc48d8164de5b8f3735a45746f9f9e3643a43afb226a87ec8937
|
||||||
index.html,1703099799910,dbb8f29b4516cc48d8164de5b8f3735a45746f9f9e3643a43afb226a87ec8937
|
css/app.5e2586d8.css,1707219328531,a7cc2db0d0fa43a6b784b8a10810b9c04537815354066629625ef7a47ced3858
|
||||||
js/app.12aedb05.js,1703099799910,6fc4b3044ff4af1648794a94ac0166f67f4c55f21d9be04e3abc717ddba74d5e
|
js/app.12aedb05.js,1707219328531,6fc4b3044ff4af1648794a94ac0166f67f4c55f21d9be04e3abc717ddba74d5e
|
||||||
js/privacy.303221f1.js,1703099799910,21931ae34846fcf31f6bc106dc4202a5f57b2baaf17cc5f20d6e473ad21957d6
|
js/privacy.303221f1.js,1707219328531,21931ae34846fcf31f6bc106dc4202a5f57b2baaf17cc5f20d6e473ad21957d6
|
||||||
js/tos.57a7714b.js,1703099799910,1386d057b0fcb0ae3c842dd3543075079405c7ea97285c531a5eec91a2b9052a
|
js/tos.57a7714b.js,1707219328531,1386d057b0fcb0ae3c842dd3543075079405c7ea97285c531a5eec91a2b9052a
|
||||||
js/privacy.303221f1.js.map,1703099799910,9364e26b1eabe05383454bdce98632a2f678a939f44df698d0df4b7cea4aa97b
|
js/privacy.303221f1.js.map,1707219328531,9364e26b1eabe05383454bdce98632a2f678a939f44df698d0df4b7cea4aa97b
|
||||||
js/tos.57a7714b.js.map,1703099799910,a5867ee962e6c1b195c74922236e96ee169174269dac08a42d6c1d670a1e728e
|
js/tos.57a7714b.js.map,1707219328531,a5867ee962e6c1b195c74922236e96ee169174269dac08a42d6c1d670a1e728e
|
||||||
js/app.12aedb05.js.map,1703099799910,43b283ca9a9bf25111f3c2d98cc0ec9ebd00972b9cc63d37f92445aeb5f6cc02
|
js/app.12aedb05.js.map,1707219328531,43b283ca9a9bf25111f3c2d98cc0ec9ebd00972b9cc63d37f92445aeb5f6cc02
|
||||||
fonts/materialdesignicons-webfont.088756a8.woff2,1703099799910,1528123c8e3e2cd3b404a98e0c5fe407612f9518be928604c864895bfd574709
|
fonts/materialdesignicons-webfont.088756a8.woff2,1707219328531,1528123c8e3e2cd3b404a98e0c5fe407612f9518be928604c864895bfd574709
|
||||||
fonts/materialdesignicons-webfont.27d2ebc4.woff,1703099799910,6db22967c7eb4ec4642be2589df077be8bd5f76c47c11175950149936b5c7080
|
fonts/materialdesignicons-webfont.27d2ebc4.woff,1707219328531,6db22967c7eb4ec4642be2589df077be8bd5f76c47c11175950149936b5c7080
|
||||||
css/chunk-vendors.33b50b56.css,1703099799910,313c9ce006aa71f284133ddbecfdcb4a62ba2695fdd49910394ef970cfa4251b
|
js/chunk-vendors.bac1ddb1.js,1707219328531,d86267ffa6f058e9be07ff6a1190bbdd7e6bba710f40496c6f37b47951c26530
|
||||||
js/chunk-vendors.bac1ddb1.js,1703099799910,d86267ffa6f058e9be07ff6a1190bbdd7e6bba710f40496c6f37b47951c26530
|
css/chunk-vendors.33b50b56.css,1707219328531,313c9ce006aa71f284133ddbecfdcb4a62ba2695fdd49910394ef970cfa4251b
|
||||||
fonts/materialdesignicons-webfont.daf3a4a8.eot,1703099799910,01f9fa92d3c20153e67efff2a6b79ebeab6ace4690b3227d0333640f4e09494a
|
fonts/materialdesignicons-webfont.392a5bf8.ttf,1707219328531,1d75ef546a31eee4eb8841133e600426cfeed7137b97b220c85ed908c5e3ae57
|
||||||
fonts/materialdesignicons-webfont.392a5bf8.ttf,1703099799910,1d75ef546a31eee4eb8841133e600426cfeed7137b97b220c85ed908c5e3ae57
|
fonts/materialdesignicons-webfont.daf3a4a8.eot,1707219328531,01f9fa92d3c20153e67efff2a6b79ebeab6ace4690b3227d0333640f4e09494a
|
||||||
js/chunk-vendors.bac1ddb1.js.map,1703099799910,b1afb6d3968224ee8013a744db7050979b4be6b1772f5f01d9ecebff17fa9cfd
|
js/chunk-vendors.bac1ddb1.js.map,1707219328531,b1afb6d3968224ee8013a744db7050979b4be6b1772f5f01d9ecebff17fa9cfd
|
||||||
|
|||||||
@@ -30,3 +30,5 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
|
|||||||
3. make sure you have access to the project `firebase projects:list`
|
3. make sure you have access to the project `firebase projects:list`
|
||||||
4. build `yarn build` and then release `firebase deploy --only hosting`
|
4. build `yarn build` and then release `firebase deploy --only hosting`
|
||||||
5. to update schedule functions `firebase deploy --only functions`
|
5. to update schedule functions `firebase deploy --only functions`
|
||||||
|
6. to update secrets use `firebase functions:secrets:set SECRET_NAME` more info [here](https://firebase.google.com/docs/functions/config-env?gen=2nd#managing_secrets)
|
||||||
|
1. `API_SERVICE_PASSWORD` for the auto-archiver-api
|
||||||
@@ -14,6 +14,9 @@ const logger = require("firebase-functions/logger");
|
|||||||
const { initializeApp } = require("firebase-admin/app");
|
const { initializeApp } = require("firebase-admin/app");
|
||||||
const { getFirestore } = require("firebase-admin/firestore");
|
const { getFirestore } = require("firebase-admin/firestore");
|
||||||
|
|
||||||
|
const { defineSecret } = require('firebase-functions/params');
|
||||||
|
const API_TOKEN = defineSecret('API_SERVICE_PASSWORD');
|
||||||
|
|
||||||
initializeApp();
|
initializeApp();
|
||||||
|
|
||||||
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
||||||
@@ -34,7 +37,7 @@ String.prototype.hashCode = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exports.processSheetScheduler = onSchedule(
|
exports.processSheetScheduler = onSchedule(
|
||||||
"* * * * *",
|
{ secrets: [API_TOKEN], schedule: "* * * * *" },
|
||||||
async (event) => {
|
async (event) => {
|
||||||
// get all documents from firestore sheets collection
|
// get all documents from firestore sheets collection
|
||||||
const db = getFirestore();
|
const db = getFirestore();
|
||||||
@@ -61,11 +64,7 @@ exports.processSheetScheduler = onSchedule(
|
|||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
Authorization:
|
Authorization: `Bearer ${API_TOKEN.value()}`,
|
||||||
"Bearer " +
|
|
||||||
Buffer.from(
|
|
||||||
"password"
|
|
||||||
).toString("base64"),
|
|
||||||
},
|
},
|
||||||
body: JSON.stringify(data),
|
body: JSON.stringify(data),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user