1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/src/controllers/user/quickConnect/helper.js
Niels van Velzen 5cbac6bcae Remove activate feature from Quick Connect page
Also added a heading and updates the layout in general
2021-06-18 21:43:01 +02:00

17 lines
511 B
JavaScript

import globalize from '../../../scripts/globalize';
import toast from '../../../components/toast/toast';
export const authorize = (code) => {
const url = ApiClient.getUrl('/QuickConnect/Authorize?Code=' + code);
ApiClient.ajax({
type: 'POST',
url: url
}, true).then(() => {
toast(globalize.translate('QuickConnectAuthorizeSuccess'));
}).catch(() => {
toast(globalize.translate('QuickConnectAuthorizeFail'));
});
// prevent bubbling
return false;
};