mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-24 11:21:02 +00:00
ci: fixing release pipeline
This commit is contained in:
@@ -9,6 +9,13 @@ const addDownloadSource = async (
|
||||
url: string
|
||||
) => {
|
||||
try {
|
||||
const existingSources = await downloadSourcesSublevel.values().all();
|
||||
const urlExists = existingSources.some((source) => source.url === url);
|
||||
|
||||
if (urlExists) {
|
||||
throw new Error("Download source with this URL already exists");
|
||||
}
|
||||
|
||||
const downloadSource = await HydraApi.post<DownloadSource>(
|
||||
"/download-sources",
|
||||
{
|
||||
@@ -17,7 +24,7 @@ const addDownloadSource = async (
|
||||
{ needsAuth: false }
|
||||
);
|
||||
|
||||
if (HydraApi.isLoggedIn()) {
|
||||
if (HydraApi.isLoggedIn() && HydraApi.hasActiveSubscription()) {
|
||||
try {
|
||||
await HydraApi.post("/profile/download-sources", {
|
||||
urls: [url],
|
||||
|
||||
@@ -13,7 +13,7 @@ const removeDownloadSource = async (
|
||||
|
||||
if (downloadSourceId) params.set("downloadSourceId", downloadSourceId);
|
||||
|
||||
if (HydraApi.isLoggedIn()) {
|
||||
if (HydraApi.isLoggedIn() && HydraApi.hasActiveSubscription()) {
|
||||
void HydraApi.delete(`/profile/download-sources?${params.toString()}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user