From c06296c793f123c850669b70563c6f9e1d5cad9d Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Tue, 5 May 2026 15:31:38 +0700 Subject: [PATCH] refactor: update controller endpoints from type json to jsonrpc for consistency --- controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.