api: update error codes in services, add more error codes where needed

This commit is contained in:
wukko
2024-08-20 21:10:37 +06:00
parent c698d272a1
commit 05abf9ad3e
21 changed files with 263 additions and 141 deletions

View File

@@ -3,7 +3,7 @@ export default async function(obj) {
.then(r => r.json())
.catch(() => {});
if (!post) return { error: 'ErrorEmptyDownload' };
if (!post) return { error: "fetch.empty" };
if (post.videoUrl) return {
urls: post.videoUrl.replace("http://", "https://"),
@@ -11,5 +11,5 @@ export default async function(obj) {
audioFilename: `vine_${obj.id}_audio`
}
return { error: 'ErrorEmptyDownload' }
return { error: "fetch.empty" }
}