refactor: update controller endpoints from type json to jsonrpc for consistency

This commit is contained in:
Suherdy Yacob 2026-05-05 15:31:38 +07:00
parent 803ec62453
commit c06296c793

View File

@ -3,7 +3,7 @@ from odoo.http import request
class AppNotificationController(http.Controller): 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): def fetch_notifications(self, **kw):
""" """
Endpoint for the Flutter app Background Task and In-App notification center. Endpoint for the Flutter app Background Task and In-App notification center.
@ -33,7 +33,7 @@ class AppNotificationController(http.Controller):
'data': notifications '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): def fetch_branches(self, **kw):
""" """
Public endpoint for the Flutter app to get branches without exposing API keys. Public endpoint for the Flutter app to get branches without exposing API keys.