2 Commits
Author SHA1 Message Date
M.A Heshmatkhah 9a5bc52839 [CLA] Mohammadamir Heshmatkhah
closes odoo/odoo#110034

X-original-commit: 3d96cad285ec3beecb31348002a2837eff1bf9d6
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-01-17 01:10:09 +01:00
M.A Heshmatkhah e73ad6a53d [FIX] auth_oauth: fragment_to_query_string return
Use the `fragment_to_query_string` decorator before the `route`
decorator on a controller endpoint. Traceback when the endpoint is
called as a `str` object is not a `Response` object.

Since httpocalypse it is advised that all decorators used with http-type
controllers return a Response. This makes it possible to decorate the
endpoint in any order, even before `@route`.

    # Preferred
    @route(...)
    @fragment_to_query_string
    def endpoint(...):
        ...

    # This work
    @fragment_to_query_string
    @route(...)
    def endpoint(...):
        ...

X-original-commit: 4a879cb4a395ad5ef47384937fcc383acdb3e431
Part-of: odoo/odoo#110034
2023-01-17 01:10:09 +01:00