salix/loopback/common/methods/application/post.js

18 lines
352 B
JavaScript
Raw Normal View History

2023-02-08 09:56:51 +00:00
module.exports = Self => {
Self.remoteMethodCtx('post', {
description: 'Returns the sent parameters',
returns: {
type: 'object',
root: true
},
http: {
path: `/post`,
verb: 'POST'
}
});
Self.post = async ctx => {
return ctx.req.body;
};
};