]> git.koha-community.org Git - koha.git/commit
Bug 29498: Remove usage of deprecated Mojolicious::Routes::Route::detour
authorJulian Maurice <julian.maurice@biblibre.com>
Tue, 16 Nov 2021 15:31:02 +0000 (15:31 +0000)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 4 Feb 2022 19:20:16 +0000 (14:20 -0500)
commitc396db60d22635e4992b4805e9afcc0f7217b971
treefc1c39260ddf38753857cc8c1934de84a8e6ea18
parent0d7d6478ff23339ba3d6fa5790bea3f8ff7afe6e
Bug 29498: Remove usage of deprecated Mojolicious::Routes::Route::detour

Mojolicious::Routes::Route::detour was deprecated in Mojolicious 8.67
and removed in Mojolicious 9

It was used in Koha::App::Plugin::RESTV1 to connect the "REST API"
Mojolicious app to the other Mojolicious apps (Koha::App::Intranet and
Koha::App::Opac), so it's only a problem when running Koha as a
Mojolicious app.

This patch makes use of the "partial" attribute instead, which does the
same thing.

Test plan:
1. Run `morbo bin/intranet`
2. Point your browser to what morbo says (should be localhost:3000)
3. Log in, and go to Administration ยป Libraries. This table uses the
   REST API, so if you see data in it, that means the API (and the
   patch) works

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/App/Plugin/RESTV1.pm