diff --git a/controllers/main.py b/controllers/main.py index eb2b3a8..5db93f4 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -3,7 +3,7 @@ from odoo.http import request class AppNotificationController(http.Controller): - @http.route('/api/loyalty/fetch_notifications', type='json', auth='user', methods=['POST'], csrf=False) + @http.route('/api/loyalty/fetch_notifications', type='jsonrpc', auth='user', methods=['POST'], csrf=False) def fetch_notifications(self, **kw): """ Endpoint for the Flutter app Background Task and In-App notification center. @@ -33,7 +33,7 @@ class AppNotificationController(http.Controller): 'data': notifications } - @http.route('/api/loyalty/branches', type='json', auth='public', methods=['POST'], csrf=False) + @http.route('/api/loyalty/branches', type='jsonrpc', auth='public', methods=['POST'], csrf=False) def fetch_branches(self, **kw): """ Public endpoint for the Flutter app to get branches without exposing API keys.