Browse Source

Update routes, package dependency declaration

Use /api/draw for the routes, and use link: for defining core
dependency.
master
TheoryOfNekomata 1 year ago
parent
commit
0876380083
4 changed files with 5 additions and 5 deletions
  1. +1
    -1
      package.json
  2. +2
    -2
      src/__tests__/index.test.ts
  3. +1
    -1
      src/routes.ts
  4. +1
    -1
      tsconfig.json

+ 1
- 1
package.json View File

@@ -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",


+ 2
- 2
src/__tests__/index.test.ts View File

@@ -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'],
})


+ 1
- 1
src/routes.ts View File

@@ -6,7 +6,7 @@ export const addRoutes = (server: FastifyInstance) => {

server.route({
method: 'POST',
url: '/',
url: '/api/draw',
handler: cardController.generate,
});
};

+ 1
- 1
tsconfig.json View File

@@ -3,7 +3,7 @@
"include": ["src", "types"],
"compilerOptions": {
"module": "ESNext",
"lib": ["ESNext"],
"lib": ["DOM","ESNext"],
"importHelpers": true,
"declaration": true,
"sourceMap": true,


Loading…
Cancel
Save