refactor: update controller endpoints from type json to jsonrpc for consistency
This commit is contained in:
parent
803ec62453
commit
c06296c793
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user