fix: fix comment

This commit is contained in:
Nolan Lawson 2022-04-10 08:55:51 -07:00
parent e714004aca
commit dd9008a703
1 changed files with 2 additions and 2 deletions

View File

@ -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