Skip to content

Instantly share code, notes, and snippets.

@SilentImp
Created July 1, 2017 16:13
Show Gist options
  • Save SilentImp/bd2f7ea517dbdb0dbc6745e3089e31ca to your computer and use it in GitHub Desktop.
Save SilentImp/bd2f7ea517dbdb0dbc6745e3089e31ca to your computer and use it in GitHub Desktop.
/**
* Check if there user with specified name on github
* @public
* @function
* @param {String} login Github login
* @return {Promise} Promise wich will resolve with object,
* containing fiels: success and payload
*/
static async checkGithub(login) {
const response = await fetch(`${config.servicesURL}/github/check/${login}`);
const json = await response.json();
return json;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment