18 lines
503 B
TypeScript
18 lines
503 B
TypeScript
import * as plugins from '../typedserver.plugins.js';
|
|
import { Handler } from './classes.handler.js';
|
|
|
|
import * as interfaces from '../interfaces/index.js';
|
|
|
|
export class HandlerTypedRouter extends Handler {
|
|
/**
|
|
* The constuctor of HandlerProxy
|
|
* @param remoteMountPointArg
|
|
*/
|
|
constructor(typedrouter: plugins.typedrequest.TypedRouter) {
|
|
super('POST', async (req, res) => {
|
|
const response = await typedrouter.routeAndAddResponse(req.body);
|
|
res.json(response);
|
|
});
|
|
}
|
|
}
|