mirror of
https://github.com/cranci1/Sora.git
synced 2026-04-21 08:32:00 +00:00
allow string as post body data type
This commit is contained in:
parent
791b033efc
commit
4b4f76392d
2 changed files with 2 additions and 2 deletions
|
|
@ -162,7 +162,7 @@ extension JSContext {
|
||||||
if(method != "GET")
|
if(method != "GET")
|
||||||
{
|
{
|
||||||
// Ensure body is properly serialized
|
// Ensure body is properly serialized
|
||||||
processedBody = body ? JSON.stringify(body) : null
|
processedBody = (body && (typeof body === 'object')) ? JSON.stringify(body) : (body || null)
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
|
|
|
||||||
|
|
@ -738,7 +738,7 @@ struct MediaInfoView: View {
|
||||||
if let currTitle = streams[index]["title"] as? String
|
if let currTitle = streams[index]["title"] as? String
|
||||||
{
|
{
|
||||||
title = currTitle
|
title = currTitle
|
||||||
streamUrl = (streams[index]["streamUrl"] as? String)!
|
streamUrl = (streams[index]["streamUrl"] as? String) ?? ""
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue