You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
665 B

  1. # Copyright 2020 Coop IT Easy SCRL fs
  2. # Robin Keunen <robin@coopiteasy.be>
  3. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
  4. from odoo.addons.base_rest.controllers import main
  5. from odoo.http import route
  6. class UserController(main.RestController):
  7. _root_path = "/api/"
  8. _collection_name = "emc.services"
  9. _default_auth = "api_key"
  10. @route(
  11. _root_path + "<string:_service_name>/test",
  12. methods=["GET"],
  13. auth="public",
  14. csrf=False,
  15. )
  16. def test(self, _service_name, _id=None, **params):
  17. return self._process_method(
  18. _service_name, "test", _id=_id, params=params
  19. )