From ccd747dc1df4ca5e8160389af0c3c5e7cc58dfd5 Mon Sep 17 00:00:00 2001 From: Shawn Rivers Date: Sun, 14 Mar 2021 22:55:22 +0900 Subject: [PATCH] feat: add API client to load Spotify IDs --- src/api/spotify.ts | 5 +++++ tsconfig-server.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 src/api/spotify.ts diff --git a/src/api/spotify.ts b/src/api/spotify.ts new file mode 100644 index 00000000000..78af4a56a2f --- /dev/null +++ b/src/api/spotify.ts @@ -0,0 +1,5 @@ +import { SpotifyIds } from 'server/actors/Spotify/models'; + +export async function loadSpotifyIdsData(): Promise { + return (await import('data/spotify.json')) as SpotifyIds; +} diff --git a/tsconfig-server.json b/tsconfig-server.json index 694f513ee53..9cb903cda91 100644 --- a/tsconfig-server.json +++ b/tsconfig-server.json @@ -11,7 +11,8 @@ "allowJs": true, "lib": ["es6", "dom", "esnext"], "baseUrl": "src", - "esModuleInterop": true + "esModuleInterop": true, + "resolveJsonModule": true }, "include": ["src"], "exclude": ["src/client", "src/pages", "node_modules"]