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

19 lines
387 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 => {
2023-02-21 13:53:35 +00:00
console.log(ctx.req.body);
2023-02-08 09:56:51 +00:00
return ctx.req.body;
};
};