X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fapi%2Fcontrollers%2FLinks.php;h=16fc8688887e44af1d4c6c07e8f17f12f12182d4;hb=b37ca790729125fa0df956220a4062f1d34c57e7;hp=2924795012d4c1cd037a008ecfd9f6fdb091ad49;hpb=78c2f122e067f8bab62deb7ef758708721f4a9ba;p=github%2Fshaarli%2FShaarli.git diff --git a/application/api/controllers/Links.php b/application/api/controllers/Links.php index 29247950..16fc8688 100644 --- a/application/api/controllers/Links.php +++ b/application/api/controllers/Links.php @@ -130,7 +130,7 @@ class Links extends ApiController $this->bookmarkService->add($bookmark); $out = ApiUtils::formatLink($bookmark, index_url($this->ci['environment'])); - $redirect = $this->ci->router->relativePathFor('getLink', ['id' => $bookmark->getId()]); + $redirect = $this->ci->router->pathFor('getLink', ['id' => $bookmark->getId()]); return $response->withAddedHeader('Location', $redirect) ->withJson($out, 201, $this->jsonStyle); }