diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-28 14:58:47 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-03-28 14:58:47 +0700 |
| commit | d9f3333103ff3190c4c6ccf2365ccbb41cdb16b4 (patch) | |
| tree | f1c8faa32c0818ca9dcf701f6ab75b3fa9a231f1 /indoteknik_api/controllers/api_v1 | |
| parent | 95794d76104f5e4408ef329e778ab4265dde3b0b (diff) | |
add options blog api
Diffstat (limited to 'indoteknik_api/controllers/api_v1')
| -rw-r--r-- | indoteknik_api/controllers/api_v1/blog.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_api/controllers/api_v1/blog.py b/indoteknik_api/controllers/api_v1/blog.py index 5f4f728e..fcca2f32 100644 --- a/indoteknik_api/controllers/api_v1/blog.py +++ b/indoteknik_api/controllers/api_v1/blog.py @@ -6,7 +6,7 @@ from odoo.http import request class Blog(controller.Controller): prefix = '/api/v1/' - @http.route(prefix + 'blog', auth='public', methods=['GET']) + @http.route(prefix + 'blog', auth='public', methods=['GET', 'OPTIONS']) @controller.Controller.must_authorized() def get_blog(self, **kw): limit = int(kw.get('limit', 0)) @@ -24,7 +24,7 @@ class Blog(controller.Controller): } return self.response(data) - @http.route(prefix + 'blog/<id>', auth='public', methods=['GET']) + @http.route(prefix + 'blog/<id>', auth='public', methods=['GET', 'OPTIONS']) @controller.Controller.must_authorized() def get_blog_by_id(self, **kw): id = kw.get('id') |
