mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Add application/json as content type for JSON requests
This commit is contained in:
parent
77ce9f1088
commit
8dcbacb196
@ -24,6 +24,7 @@ export default class channelMapper {
|
|||||||
tunerChannelId: channelId,
|
tunerChannelId: channelId,
|
||||||
providerChannelId: providerChannelId
|
providerChannelId: providerChannelId
|
||||||
}),
|
}),
|
||||||
|
contentType: 'application/json',
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
}).then(mapping => {
|
}).then(mapping => {
|
||||||
const listItem = dom.parentWithClass(button, 'listItem');
|
const listItem = dom.parentWithClass(button, 'listItem');
|
||||||
|
@ -169,7 +169,8 @@ import 'emby-button';
|
|||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
ValidateWriteable: validateWriteable,
|
ValidateWriteable: validateWriteable,
|
||||||
Path: path
|
Path: path
|
||||||
})
|
}),
|
||||||
|
contentType: 'application/json'
|
||||||
}).catch(response => {
|
}).catch(response => {
|
||||||
if (response) {
|
if (response) {
|
||||||
if (response.status === 404) {
|
if (response.status === 404) {
|
||||||
|
@ -48,7 +48,8 @@ import libraryMenu from 'libraryMenu';
|
|||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
Path: form.querySelector('.txtEncoderPath').value,
|
Path: form.querySelector('.txtEncoderPath').value,
|
||||||
PathType: 'Custom'
|
PathType: 'Custom'
|
||||||
})
|
}),
|
||||||
|
contentType: 'application/json'
|
||||||
}).then(Dashboard.processServerConfigurationUpdateResult, onSaveEncodingPathFailure);
|
}).then(Dashboard.processServerConfigurationUpdateResult, onSaveEncodingPathFailure);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,8 @@ import globalize from 'globalize';
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
Pin: view.querySelector('#txtPin').value
|
Pin: view.querySelector('#txtPin').value
|
||||||
})
|
}),
|
||||||
|
contentType: 'application/json'
|
||||||
}).then(processForgotPasswordResult);
|
}).then(processForgotPasswordResult);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
return false;
|
return false;
|
||||||
|
@ -12,7 +12,8 @@ function save(page) {
|
|||||||
apiClient.ajax({
|
apiClient.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: JSON.stringify(config),
|
data: JSON.stringify(config),
|
||||||
url: apiClient.getUrl('Startup/RemoteAccess')
|
url: apiClient.getUrl('Startup/RemoteAccess'),
|
||||||
|
contentType: 'application/json'
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
navigateToNextPage();
|
navigateToNextPage();
|
||||||
|
@ -12,7 +12,8 @@ function save(page) {
|
|||||||
apiClient.ajax({
|
apiClient.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: JSON.stringify(config),
|
data: JSON.stringify(config),
|
||||||
url: apiClient.getUrl('Startup/Configuration')
|
url: apiClient.getUrl('Startup/Configuration'),
|
||||||
|
contentType: 'application/json',
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
loading.hide();
|
loading.hide();
|
||||||
navigateToNextPage();
|
navigateToNextPage();
|
||||||
|
@ -18,7 +18,8 @@ function save(page) {
|
|||||||
apiClient.ajax({
|
apiClient.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: JSON.stringify(config),
|
data: JSON.stringify(config),
|
||||||
url: apiClient.getUrl('Startup/Configuration')
|
url: apiClient.getUrl('Startup/Configuration'),
|
||||||
|
contentType: 'application/json'
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
Dashboard.navigate('wizarduser.html');
|
Dashboard.navigate('wizarduser.html');
|
||||||
});
|
});
|
||||||
|
@ -27,7 +27,8 @@ function submit(form) {
|
|||||||
Name: form.querySelector('#txtUsername').value,
|
Name: form.querySelector('#txtUsername').value,
|
||||||
Password: form.querySelector('#txtManualPassword').value
|
Password: form.querySelector('#txtManualPassword').value
|
||||||
}),
|
}),
|
||||||
url: apiClient.getUrl('Startup/User')
|
url: apiClient.getUrl('Startup/User'),
|
||||||
|
contentType: 'application/json'
|
||||||
}).then(onUpdateUserComplete);
|
}).then(onUpdateUserComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user