Skip to content

Instantly share code, notes, and snippets.

@Juanpablobar
Created September 27, 2022 00:38
Show Gist options
  • Save Juanpablobar/3bd1d3cce5f302d7abec52886de41bf2 to your computer and use it in GitHub Desktop.
Save Juanpablobar/3bd1d3cce5f302d7abec52886de41bf2 to your computer and use it in GitHub Desktop.
Set Region ID
fetch("/api/sessions/", {
method: 'PATCH',
headers: {
"Content-Type":"application/json"
},
body: JSON.stringify({
"public": {
"regionId": {
"value": btoa("SW#"+`${account}0127;${account}0178;chedrauimxdarkstore`)
}
}
}),
redirect: 'follow'
})
.then(response => response.json())
.then(result => console.log(result))
.then(()=> window.location.reload())
.catch(error => console.log('error', error));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment