diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-12-21 16:52:43 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-12-21 16:52:43 +0700 |
| commit | 3d13c85ef615a88a6bdce454904bf0a3cda08690 (patch) | |
| tree | d2f80c6095f456a04a3786059ff9030ec41208eb | |
| parent | 56a0859b06725642ccca6f956147ee87a9d7e6a8 (diff) | |
update user cors
| -rw-r--r-- | indoteknik_api/controllers/api_v1/user.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_api/controllers/api_v1/user.py b/indoteknik_api/controllers/api_v1/user.py index 31ec8a96..46ac82ae 100644 --- a/indoteknik_api/controllers/api_v1/user.py +++ b/indoteknik_api/controllers/api_v1/user.py @@ -113,7 +113,7 @@ class Auth(controller.Controller): 'token': user.activation_token, }) - @http.route(prefix + 'user/<id>', auth='public', methods=['PUT'], csrf=False) + @http.route(prefix + 'user/<id>', auth='public', methods=['PUT', 'OPTIONS'], csrf=False) def update_user(self, **kw): if not self.authenticate(): return self.response(code=401, description='Unauthorized') @@ -131,7 +131,7 @@ class Auth(controller.Controller): if not is_verify: return self.response(code=401, description='Unauthorized') - allowed_field = ['name', 'email', 'phone', 'mobile', 'password'] + allowed_field = ['name', 'phone', 'mobile', 'password'] for field in allowed_field: field_value = kw.get(field) if field_value: |
