summaryrefslogtreecommitdiff
path: root/indoteknik_api/controllers/api_v1/lead.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-27 11:44:21 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-27 11:44:21 +0700
commita6acc141629f358f885f62e395986131c1ec1909 (patch)
tree28b423d35fb118aac37edfbe36715461797fc747 /indoteknik_api/controllers/api_v1/lead.py
parentd35c2dce88a87bc05d30c4935d51d7d58aa5d37d (diff)
<iman> update merchant
Diffstat (limited to 'indoteknik_api/controllers/api_v1/lead.py')
-rw-r--r--indoteknik_api/controllers/api_v1/lead.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/indoteknik_api/controllers/api_v1/lead.py b/indoteknik_api/controllers/api_v1/lead.py
index d5cc7c5c..6ca9d419 100644
--- a/indoteknik_api/controllers/api_v1/lead.py
+++ b/indoteknik_api/controllers/api_v1/lead.py
@@ -26,4 +26,29 @@ class Lead(controller.Controller):
lead = request.env['crm.lead'].create(params['value'])
+ return self.response(True)
+
+ @http.route('/api/v1/merchant', auth='public', methods=['POST', 'OPTIONS'], csrf=False)
+ @controller.Controller.must_authorized()
+ def create_merchant(self, **kw):
+ params = self.get_request_params(kw, {
+ "name": ["required"],
+ "contact_name": [],
+ "email_from": [],
+ "phone": [],
+ "file_npwp": [],
+ "file_nib": [],
+ "file_tdp": [],
+ "file_siup": [],
+ "file_quotation": [],
+ "description": []
+ })
+
+ if not params['valid']:
+ return self.response(code=400, description=params)
+
+ # params['value']['user_id'] = 20
+
+ # lead = request.env['crm.lead'].create(params['value'])
+
return self.response(True) \ No newline at end of file