diff --git a/components/ProjectGroupPicker.vue b/components/ProjectGroupPicker.vue index 6196b13..7afacf1 100644 --- a/components/ProjectGroupPicker.vue +++ b/components/ProjectGroupPicker.vue @@ -92,7 +92,7 @@ const loadGroups = async (reset = false) => { } let timeoutId: ReturnType -watch(searchText, (newVal, oldVal) => { +watch(searchText, () => { if (!isOpen.value) return clearTimeout(timeoutId) diff --git a/services/tdei.ts b/services/tdei.ts index 29d2028..20e6f3a 100644 --- a/services/tdei.ts +++ b/services/tdei.ts @@ -247,7 +247,7 @@ export class TdeiClient extends BaseHttpClient implements ICancelableClient { && (filename.endsWith('.zip') || filename.endsWith('.xml')); const out = { - dataset: await entries.find(e => isDataset(e.filename))?.getData?.(blobWriter), + dataset: await entries.find(e => isDataset(e.filename))!.getData(blobWriter), metadata: entries.find(e => e.filename.endsWith('.json')) }; @@ -383,13 +383,13 @@ export class TdeiClient extends BaseHttpClient implements ICancelableClient { const jwt = getJwtBody(body.access_token); this.#auth.username = username; - this.#auth.subject = jwt.sub as unknown as string; - this.#auth.displayName = jwt.name as unknown as string; - this.#auth.email = jwt.email as unknown as string; + this.#auth.subject = jwt.sub as string; + this.#auth.displayName = jwt.name as string; + this.#auth.email = jwt.email as string; this.#auth.accessToken = body.access_token; this.#auth.refreshToken = body.refresh_token; this.#auth.expiresAt = expiresAsDate(body.expires_in); - this.#auth.refreshExpiresAt = expiresAsDate(body.refresh_expires_in); + this.#auth.store(); this.#setAuthHeader();