You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
544 B

var params = new URLSearchParams(window.location.search);
var id = params.get('id');
fetch(api+'/client',
{
method: 'POST',
body: JSON.stringify({
client_id : id
})
}).then(handleResponse);
async function handleResponse(response){
if (response.ok){
var json = await response.json();
get('client_id').value = json.client_id;
get('name').value = json.name;
get('secret').value = json.secret;
get('redirects').value = json.redirect_uris.join("\n");
}
}