1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

remove reaming getconnect related

This commit is contained in:
grafixeyehero 2019-10-28 01:55:05 +03:00
parent 1e5568943c
commit 1c84e18c8a

View file

@ -457,29 +457,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
}
}
function addAppInfoToConnectRequest(request) {
request.headers = request.headers || {};
request.headers["X-Application"] = appName + "/" + appVersion;
}
function exchangePin(pinInfo) {
if (!pinInfo) {
throw new Error("pinInfo cannot be null");
}
var request = {
type: "POST",
url: getConnectUrl("pin/authenticate"),
data: {
deviceId: pinInfo.DeviceId,
pin: pinInfo.Pin
},
dataType: "json"
};
addAppInfoToConnectRequest(request);
return ajax(request);
}
console.log("Begin ConnectionManager constructor");
var self = this;
this._apiClients = [];
@ -773,43 +750,6 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
};
return self.connectToServer(server, options).catch(onFail);
};
self.createPin = function () {
var request = {
type: "POST",
url: getConnectUrl("pin"),
data: {
deviceId: deviceId
},
dataType: "json"
};
addAppInfoToConnectRequest(request);
return ajax(request);
};
self.getPinStatus = function (pinInfo) {
if (!pinInfo) {
throw new Error("pinInfo cannot be null");
}
var queryString = {
deviceId: pinInfo.DeviceId,
pin: pinInfo.Pin
};
var request = {
type: "GET",
url: getConnectUrl("pin") + "?" + paramsToString(queryString),
dataType: "json"
};
addAppInfoToConnectRequest(request);
return ajax(request);
};
self.exchangePin = function (pinInfo) {
if (!pinInfo) {
throw new Error("pinInfo cannot be null");
}
};
};
ConnectionManager.prototype.connect = function (options) {