Refine subscription import and refresh flow
Build and Deploy Gateway / build-and-push (push) Successful in 15s
Build and Deploy Gateway / deploy (push) Successful in 13s

This commit is contained in:
2026-07-12 11:18:33 +03:00
parent ba15a25c89
commit 005c7a101b
15 changed files with 190 additions and 218 deletions
-9
View File
@@ -16,10 +16,6 @@ export class HarborApiError extends Error {
}
}
export function validationStatusForError(error) {
return error?.code === 'SUBSCRIPTION_INVALID' ? 'invalid' : 'unavailable';
}
export async function request(url, options = {}, fetchImpl = fetch) {
let response;
try {
@@ -54,11 +50,6 @@ export const api = {
state: () => request('/api/state'),
version: () => request('/api/version'),
subscription: {
validate: (url, signal) => request('/api/subscription/validate', {
method: 'POST',
body: JSON.stringify({ url }),
signal,
}),
fetch: (url) => request('/api/subscription/fetch', {
method: 'POST',
body: JSON.stringify({ url }),