feat: create post route for debug
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2023-02-08 10:56:51 +01:00
parent 38f34adc9a
commit b209ecb011
3 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,17 @@
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;
};
};

View File

@ -1,4 +1,5 @@
module.exports = function(Self) {
require('../methods/application/status')(Self);
require('../methods/application/post')(Self);
};

View File

@ -7,6 +7,12 @@
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
},
{
"property": "post",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}