mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 00:54:03 +02:00
d3.xml for status so that it works without auth
This commit is contained in:
+4
-3
@@ -243,12 +243,13 @@ iD.Connection = function(context) {
|
||||
};
|
||||
|
||||
connection.status = function(callback) {
|
||||
function done(err, capabilities) {
|
||||
if (err) return callback(err);
|
||||
function done(capabilities) {
|
||||
var apiStatus = capabilities.getElementsByTagName('status');
|
||||
callback(undefined, apiStatus[0].getAttribute('api'));
|
||||
}
|
||||
oauth.xhr({ method: 'GET', path: '/api/capabilities' }, done);
|
||||
d3.xml(url + '/api/capabilities').get()
|
||||
.on('load', done)
|
||||
.on('error', callback);
|
||||
};
|
||||
|
||||
function abortRequest(i) { i.abort(); }
|
||||
|
||||
Reference in New Issue
Block a user