X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fapi%2FApiUtils.php;h=5ac07c4d2f0e7331969f714325d00ce6a68a1edb;hb=def39d0dd7a81a4af9ad68b62c9e9823fbc2b38e;hp=1824b5d08171f19c27ebb28d3831eacbfc040538;hpb=ff3b5dc5542ec150f0d9b447394364a15e9156d0;p=github%2Fshaarli%2FShaarli.git diff --git a/application/api/ApiUtils.php b/application/api/ApiUtils.php index 1824b5d0..5ac07c4d 100644 --- a/application/api/ApiUtils.php +++ b/application/api/ApiUtils.php @@ -15,6 +15,8 @@ class ApiUtils * @param string $token JWT token extracted from the headers. * @param string $secret API secret set in the settings. * + * @return bool true on success + * * @throws ApiAuthorizationException the token is not valid. */ public static function validateJwtToken($token, $secret) @@ -45,6 +47,8 @@ class ApiUtils ) { throw new ApiAuthorizationException('Invalid JWT issued time'); } + + return true; } /** @@ -59,7 +63,7 @@ class ApiUtils { $out['id'] = $link['id']; // Not an internal link - if ($link['url'][0] != '?') { + if (! is_note($link['url'])) { $out['url'] = $link['url']; } else { $out['url'] = $indexUrl . $link['url'];