From 895a2e9ae261a6e11ae5673f0694165919edc6e7 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Thu, 16 Feb 2023 13:57:28 +0700 Subject: json dump wati --- indoteknik_api/controllers/api_v1/wati.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indoteknik_api/controllers/api_v1') diff --git a/indoteknik_api/controllers/api_v1/wati.py b/indoteknik_api/controllers/api_v1/wati.py index 009ea244..01b32653 100644 --- a/indoteknik_api/controllers/api_v1/wati.py +++ b/indoteknik_api/controllers/api_v1/wati.py @@ -10,9 +10,10 @@ class Wati(controller.Controller): @http.route(prefix + 'wati/notification', auth='none', type='json', csrf=False, cors='*', methods=['POST', 'OPTIONS']) def notification(self, **kw): json_raw = json.loads(request.httprequest.data) + json_dump = json.dumps(json_raw, indent=4, sort_keys=True) request.env['wati.notification'].create([{ - 'json_raw': json_raw + 'json_raw': json_dump }]) return -- cgit v1.2.3