Use /api/draw for the routes, and use link: for defining core dependency.master
@@ -59,7 +59,7 @@ | |||||
}, | }, | ||||
"dependencies": { | "dependencies": { | ||||
"fastify": "^3.27.0", | "fastify": "^3.27.0", | ||||
"@modal-sh/oblique-strategies-core": "file:../core" | |||||
"@modal-sh/oblique-strategies-core": "link:../core" | |||||
}, | }, | ||||
"scripts": { | "scripts": { | ||||
"prepublishOnly": "pridepack clean && pridepack build", | "prepublishOnly": "pridepack clean && pridepack build", | ||||
@@ -27,7 +27,7 @@ describe('Example', () => { | |||||
it('draws a card from default set', async () => { | it('draws a card from default set', async () => { | ||||
const response = await server | const response = await server | ||||
.inject() | .inject() | ||||
.post('/') | |||||
.post('/api/draw') | |||||
.headers({ | .headers({ | ||||
Accept: 'text/plain', | Accept: 'text/plain', | ||||
}); | }); | ||||
@@ -39,7 +39,7 @@ describe('Example', () => { | |||||
it('draws a card from custom sets', async () => { | it('draws a card from custom sets', async () => { | ||||
const response = await server | const response = await server | ||||
.inject() | .inject() | ||||
.post('/') | |||||
.post('/api/draw') | |||||
.query({ | .query({ | ||||
cards: ['default', 'text:hello|world'], | cards: ['default', 'text:hello|world'], | ||||
}) | }) | ||||
@@ -6,7 +6,7 @@ export const addRoutes = (server: FastifyInstance) => { | |||||
server.route({ | server.route({ | ||||
method: 'POST', | method: 'POST', | ||||
url: '/', | |||||
url: '/api/draw', | |||||
handler: cardController.generate, | handler: cardController.generate, | ||||
}); | }); | ||||
}; | }; |
@@ -3,7 +3,7 @@ | |||||
"include": ["src", "types"], | "include": ["src", "types"], | ||||
"compilerOptions": { | "compilerOptions": { | ||||
"module": "ESNext", | "module": "ESNext", | ||||
"lib": ["ESNext"], | |||||
"lib": ["DOM","ESNext"], | |||||
"importHelpers": true, | "importHelpers": true, | ||||
"declaration": true, | "declaration": true, | ||||
"sourceMap": true, | "sourceMap": true, | ||||