mirror of
https://github.com/imputnet/cobalt.git
synced 2026-01-02 04:51:20 +00:00
api: move request functions to separate file
- request status id is no longer a cryptic number - descriptive function names
This commit is contained in:
@@ -68,7 +68,7 @@ export default async function(obj) {
|
||||
data = data[0]?.data?.children[0]?.data;
|
||||
|
||||
if (data?.url?.endsWith('.gif')) return {
|
||||
typeId: 1,
|
||||
typeId: "redirect",
|
||||
urls: data.url
|
||||
}
|
||||
|
||||
@@ -106,12 +106,12 @@ export default async function(obj) {
|
||||
let id = video.split('/')[3];
|
||||
|
||||
if (!audio) return {
|
||||
typeId: 1,
|
||||
typeId: "redirect",
|
||||
urls: video
|
||||
}
|
||||
|
||||
return {
|
||||
typeId: 2,
|
||||
typeId: "stream",
|
||||
type: "render",
|
||||
urls: [video, audioFileLink],
|
||||
audioFilename: `reddit_${id}_audio`,
|
||||
|
||||
Reference in New Issue
Block a user