private static void GetNPMLoginToken(ScopedRegistry registry, string username, string password) { NPMResponse response = NPMLogin.GetLoginToken(registry.url, username, password); if (string.IsNullOrEmpty(response.ok)) { EditorUtility.DisplayDialog("Cannot get token", response.error, "Ok"); } else { registry.token = response.token; } }
private static bool GetNPMLoginToken(ScopedRegistry registry, string username, string password) { error = null; NPMResponse response = NPMLogin.GetLoginToken(registry.url, username, password); if (string.IsNullOrEmpty(response.ok)) { // EditorUtility.DisplayDialog("Cannot get token", response.error, "Ok"); error = "Cannot get token: " + response.error; return(false); } else { registry.token = response.token; return(true); } }