diff --git a/pages/admin/new.js b/pages/admin/new.js index 4df1dbe..f5b8544 100644 --- a/pages/admin/new.js +++ b/pages/admin/new.js @@ -79,9 +79,11 @@ function NewExperimentForm() { Storage Location - option': {background: 'black', color: 'white'}}}> + + + + Choose the region where the data will be stored. @@ -133,6 +135,7 @@ async function handleCreateExperiment( const user = auth.currentUser; const title = document.querySelector("#title").value; let osfRepo = document.querySelector("#osf-repo").value; + const region = document.querySelector("#osf-component-region").value; const osfComponentName = document.querySelector("#osf-component-name").value; const nConditions = 1; const useValidation = true; @@ -173,7 +176,7 @@ async function handleCreateExperiment( } const osfResult = await fetch( - `https://api.osf.io/v2/nodes/${osfRepo}/children/`, + `https://api.osf.io/v2/nodes/${osfRepo}/children/?region=${region}`, { method: "POST", headers: {