diff --git a/package.json b/package.json index 96cd694..5f9128d 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ }, "dependencies": { "fastify": "^3.27.0", - "@modal-sh/oblique-strategies-core": "file:../core" + "@modal-sh/oblique-strategies-core": "link:../core" }, "scripts": { "prepublishOnly": "pridepack clean && pridepack build", diff --git a/src/__tests__/index.test.ts b/src/__tests__/index.test.ts index ab3bb46..c26b273 100644 --- a/src/__tests__/index.test.ts +++ b/src/__tests__/index.test.ts @@ -27,7 +27,7 @@ describe('Example', () => { it('draws a card from default set', async () => { const response = await server .inject() - .post('/') + .post('/api/draw') .headers({ Accept: 'text/plain', }); @@ -39,7 +39,7 @@ describe('Example', () => { it('draws a card from custom sets', async () => { const response = await server .inject() - .post('/') + .post('/api/draw') .query({ cards: ['default', 'text:hello|world'], }) diff --git a/src/routes.ts b/src/routes.ts index b73a7e3..0043d1d 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -6,7 +6,7 @@ export const addRoutes = (server: FastifyInstance) => { server.route({ method: 'POST', - url: '/', + url: '/api/draw', handler: cardController.generate, }); }; diff --git a/tsconfig.json b/tsconfig.json index 61c1843..104e3b8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "include": ["src", "types"], "compilerOptions": { "module": "ESNext", - "lib": ["ESNext"], + "lib": ["DOM","ESNext"], "importHelpers": true, "declaration": true, "sourceMap": true,