Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @license
* Copyright Andrey Chalkin (https://github.com/L2jLiga). All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/L2jLiga/fastify-decorators/blob/master/LICENSE
*/
import { POST, RequestHandler } from 'fastify-decorators';
@POST({
url: '/post',
options: {
schema: {
response: {
200: {
type: 'object',
properties: {
message: { type: 'string' }
}
}
}
}
}
})
class PostHandler extends RequestHandler {
async handle() {
/**
* @license
* Copyright Andrey Chalkin (https://github.com/L2jLiga). All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/L2jLiga/fastify-decorators/blob/master/LICENSE
*/
import { POST, RequestHandler } from 'fastify-decorators';
@POST({
url: '/post',
options: {
schema: {
response: {
200: {
type: 'object',
properties: {
message: { type: 'string' }
}
}
}
}
}
})
class PostHandler extends RequestHandler {
public async handle(): Promise {