mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-18 08:43:57 +00:00
fix: improving readability
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user