fix: improving readability

This commit is contained in:
Chubby Granny Chaser
2025-04-12 21:54:52 +01:00
parent 148e272c4d
commit d1cdfc0ba5

View File

@@ -13,11 +13,13 @@ export class HydraDebridClient {
);
}
public static getDownloadUrl(magnet: string) {
public static async getDownloadUrl(magnet: string) {
try {
return HydraApi.post("/debrid/request-file", {
const response = await HydraApi.post("/debrid/request-file", {
magnet,
}).then((response) => response.downloadUrl);
});
return response.downloadUrl;
} catch (error) {
return null;
}