]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/api/controllers/Links.php
postLink: change relative path to absolute path
[github/shaarli/Shaarli.git] / application / api / controllers / Links.php
index 2924795012d4c1cd037a008ecfd9f6fdb091ad49..16fc8688887e44af1d4c6c07e8f17f12f12182d4 100644 (file)
@@ -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);
     }