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

Merge pull request #1801 from MrTimscampi/json-stringify

Use JSON when POSTing data
This commit is contained in:
dkanada 2020-08-15 11:30:29 +09:00 committed by GitHub
commit b761203739
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 15 additions and 15 deletions

View file

@ -19,11 +19,11 @@ export default class channelMapper {
connectionManager.getApiClient(options.serverId).ajax({
type: 'POST',
url: ApiClient.getUrl('LiveTv/ChannelMappings'),
data: {
data: JSON.stringify({
providerId: providerId,
tunerChannelId: channelId,
providerChannelId: providerChannelId
},
}),
dataType: 'json'
}).then(mapping => {
const listItem = dom.parentWithClass(button, 'listItem');

View file

@ -166,10 +166,10 @@ import 'emby-button';
return apiClient.ajax({
type: 'POST',
url: apiClient.getUrl('Environment/ValidatePath'),
data: {
data: JSON.stringify({
ValidateWriteable: validateWriteable,
Path: path
}
})
}).catch(response => {
if (response) {
if (response.status === 404) {