fix: fix comment
This commit is contained in:
parent
e714004aca
commit
dd9008a703
|
@ -20,7 +20,7 @@ export async function uploadMedia (instanceName, accessToken, file, description)
|
||||||
try {
|
try {
|
||||||
return (await doUploadMedia('v2', instanceName, accessToken, file, description))
|
return (await doUploadMedia('v2', instanceName, accessToken, file, description))
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err && err.status === 404) { // fall back to old search API
|
if (err && err.status === 404) { // fall back to old v1 API
|
||||||
return doUploadMedia('v1', instanceName, accessToken, file, description)
|
return doUploadMedia('v1', instanceName, accessToken, file, description)
|
||||||
} else {
|
} else {
|
||||||
throw err
|
throw err
|
||||||
|
@ -32,7 +32,7 @@ export async function putMediaMetadata (instanceName, accessToken, mediaId, desc
|
||||||
try {
|
try {
|
||||||
return (await doPutMediaMetadata('v2', instanceName, accessToken, mediaId, description, focus))
|
return (await doPutMediaMetadata('v2', instanceName, accessToken, mediaId, description, focus))
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err && err.status === 404) { // fall back to old search API
|
if (err && err.status === 404) { // fall back to old v1 API
|
||||||
return doPutMediaMetadata('v1', instanceName, accessToken, mediaId, description, focus)
|
return doPutMediaMetadata('v1', instanceName, accessToken, mediaId, description, focus)
|
||||||
} else {
|
} else {
|
||||||
throw err
|
throw err
|
||||||
|
|
Loading…
Reference in New Issue