add base controller
This commit is contained in:
parent
9a04281641
commit
bed292aa12
@ -16,6 +16,7 @@ module.exports = {
|
||||
PORT: 2987,
|
||||
DEBUG: 'jc:*',
|
||||
NODE_ENV: 'production',
|
||||
NODE_PATH: './dist',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -59,7 +59,6 @@
|
||||
"prettier": "^2.3.0",
|
||||
"ts-node": "^9.1.1",
|
||||
"tsconfig-paths": "^3.9.0",
|
||||
"tslint": "^6.1.1",
|
||||
"typescript": "^4.1.3"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import fastify, { FastifyError, FastifyInstance, FastifyReply, FastifyRequest } from 'fastify'
|
||||
import helmet from 'fastify-helmet'
|
||||
import { IncomingMessage, Server, ServerResponse } from 'http'
|
||||
import { RouterMap } from 'decorators/router'
|
||||
import { RouterMap } from './decorators/router'
|
||||
import { mongoose } from '@typegoose/typegoose'
|
||||
import logger from 'logger/logger'
|
||||
import config from 'config/config'
|
||||
|
10
src/controllers/subscribe.controller.ts
Normal file
10
src/controllers/subscribe.controller.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import { role, router } from '../decorators/router'
|
||||
import BaseController from '../common/base.controller'
|
||||
|
||||
class SubscribeController extends BaseController {
|
||||
@role('anon')
|
||||
@router('post /api/svr/send_msg')
|
||||
async receive(req: any) {
|
||||
return {}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user