blob: 009ea2448e0411e4fd17b97958679187b7ac8f71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
from .. import controller
from odoo import http
from odoo.http import request
import json
class Wati(controller.Controller):
prefix = '/api/v1/'
@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)
request.env['wati.notification'].create([{
'json_raw': json_raw
}])
return
|