Skip to content

Commit

Permalink
Fixed linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
matvp91 committed Dec 4, 2024
1 parent 9a048c2 commit 1d02aed
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/stitcher/src/adapters/kv/memory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ const kv = new Map<string, string>();

export async function set(key: string, value: string, ttl: number) {
kv.set(key, value);
await Promise.resolve(ttl);
}

export async function get(key: string) {
return kv.get(key);
return Promise.resolve(kv.get(key) ?? null);
}
4 changes: 4 additions & 0 deletions packages/stitcher/src/vast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ async function scheduleForPackage(assetId: string, url: string) {
}

async function fetchAsset(id: string) {
if (!api) {
// If we have no api configured, we cannot use it.
return null;
}
const { data, status } = await api.assets({ id }).get();
if (status === 404) {
return null;
Expand Down
1 change: 0 additions & 1 deletion packages/stitcher/test/mock.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { DateTime } from "luxon";
import type { MasterPlaylist, MediaPlaylist } from "../src/parser";
import type { Session } from "../src/session";
import type { Interstitial } from "../src/types";

export function mockMaster(): MasterPlaylist {
return {
Expand Down

0 comments on commit 1d02aed

Please sign in to comment.