My Code:
from odoo import http
from odoo.http import request
class CustomController(http.Controller):
@http.route("/test/validate", type="json", auth="public", website=False, methods["POST"])
def custom_api(self):
body = {'decision': 'reject'}
return request.make_json_response(body)
Output:
{
"jsonrpc": "2.0",
"id": null,
"result": ""
}
I need to only send the raw JSON response and not the RPC response.
{
'decision': 'reject'
}
How to do this?
Response:
{
"jsonrpc": "2.0",
"id": null,
"result": "<Response 22 bytes [200 OK]>"
}