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,
|
||||
providerChannelId: providerChannelId
|
||||
}),
|
||||
contentType: 'application/json',
|
||||
dataType: 'json'
|
||||
}).then(mapping => {
|
||||
const listItem = dom.parentWithClass(button, 'listItem');
|
||||
|
@ -169,7 +169,8 @@ import 'emby-button';
|
||||
data: JSON.stringify({
|
||||
ValidateWriteable: validateWriteable,
|
||||
Path: path
|
||||
})
|
||||
}),
|
||||
contentType: 'application/json'
|
||||
}).catch(response => {
|
||||
if (response) {
|
||||
if (response.status === 404) {
|
||||
|
@ -48,7 +48,8 @@ import libraryMenu from 'libraryMenu';
|
||||
data: JSON.stringify({
|
||||
Path: form.querySelector('.txtEncoderPath').value,
|
||||
PathType: 'Custom'
|
||||
})
|
||||
}),
|
||||
contentType: 'application/json'
|
||||
}).then(Dashboard.processServerConfigurationUpdateResult, onSaveEncodingPathFailure);
|
||||
});
|
||||
}
|
||||
|
@ -31,7 +31,8 @@ import globalize from 'globalize';
|
||||
dataType: 'json',
|
||||
data: JSON.stringify({
|
||||
Pin: view.querySelector('#txtPin').value
|
||||
})
|
||||
}),
|
||||
contentType: 'application/json'
|
||||
}).then(processForgotPasswordResult);
|
||||
e.preventDefault();
|
||||
return false;
|
||||
|
@ -12,7 +12,8 @@ function save(page) {
|
||||
apiClient.ajax({
|
||||
type: 'POST',
|
||||
data: JSON.stringify(config),
|
||||
url: apiClient.getUrl('Startup/RemoteAccess')
|
||||
url: apiClient.getUrl('Startup/RemoteAccess'),
|
||||
contentType: 'application/json'
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
navigateToNextPage();
|
||||
|
@ -12,7 +12,8 @@ function save(page) {
|
||||
apiClient.ajax({
|
||||
type: 'POST',
|
||||
data: JSON.stringify(config),
|
||||
url: apiClient.getUrl('Startup/Configuration')
|
||||
url: apiClient.getUrl('Startup/Configuration'),
|
||||
contentType: 'application/json',
|
||||
}).then(function () {
|
||||
loading.hide();
|
||||
navigateToNextPage();
|
||||
|
@ -18,7 +18,8 @@ function save(page) {
|
||||
apiClient.ajax({
|
||||
type: 'POST',
|
||||
data: JSON.stringify(config),
|
||||
url: apiClient.getUrl('Startup/Configuration')
|
||||
url: apiClient.getUrl('Startup/Configuration'),
|
||||
contentType: 'application/json'
|
||||
}).then(function () {
|
||||
Dashboard.navigate('wizarduser.html');
|
||||
});
|
||||
|
@ -27,7 +27,8 @@ function submit(form) {
|
||||
Name: form.querySelector('#txtUsername').value,
|
||||
Password: form.querySelector('#txtManualPassword').value
|
||||
}),
|
||||
url: apiClient.getUrl('Startup/User')
|
||||
url: apiClient.getUrl('Startup/User'),
|
||||
contentType: 'application/json'
|
||||
}).then(onUpdateUserComplete);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user