T76883: Bug fix: Ensure /sys/ is checked even if uri.params.api is not available
T76883: Bug fix: Ensure /sys/ is checked even if uri.params.api is not
available

The code previously assumed req.uri.params exists (which it currently
does not), an hence req.uri.params.api failed to resolve, causing the if
to fail (regardless of the OR). This commit splits the check in two
parts to ensure /sys/ paths do not get overlooked.

Krenair/restbase,Krenair/restbase,gwicke/restbase,milimetric/restbase,wikimedia/restbase,wikimedia/hyperswitch,milimetric/restbase,inverno/restbase,wikimedia/mediawiki-services-restbase,cscott/restbase,physikerwelt/restbase,Pchelolo/restbase,eevans/restbase,gwicke/restbase,physikerwelt/restbase,d00rman/restbase,inverno/restbase,wikimedia/mediawiki-services-restbase,eevans/restbase,cscott/restbase,d00rman/restbase,Pchelolo/restbase,wikimedia/restbase