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:
parent
1e5568943c
commit
1c84e18c8a
1 changed files with 0 additions and 60 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue