浏览代码

Update routes, package dependency declaration

Use /api/draw for the routes, and use link: for defining core
dependency.
master
父节点
当前提交
0876380083
共有 4 个文件被更改,包括 5 次插入5 次删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

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

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

+ 1
- 1
tsconfig.json 查看文件

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


正在加载...
取消
保存