aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/api
diff options
context:
space:
mode:
authorLoïc Carr <zizou.xena@gmail.com>2020-10-28 19:57:40 -0700
committerLoïc Carr <zizou.xena@gmail.com>2020-10-28 20:08:18 -0700
commitb37ca790729125fa0df956220a4062f1d34c57e7 (patch)
tree15c758ef4acc7a6dff56a4cae28ce94fc0d3543e /application/api
parent78c2f122e067f8bab62deb7ef758708721f4a9ba (diff)
downloadShaarli-b37ca790729125fa0df956220a4062f1d34c57e7.tar.gz
Shaarli-b37ca790729125fa0df956220a4062f1d34c57e7.tar.zst
Shaarli-b37ca790729125fa0df956220a4062f1d34c57e7.zip
postLink: change relative path to absolute path
Diffstat (limited to 'application/api')
-rw-r--r--application/api/controllers/Links.php2
1 files changed, 1 insertions, 1 deletions
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
130 130
131 $this->bookmarkService->add($bookmark); 131 $this->bookmarkService->add($bookmark);
132 $out = ApiUtils::formatLink($bookmark, index_url($this->ci['environment'])); 132 $out = ApiUtils::formatLink($bookmark, index_url($this->ci['environment']));
133 $redirect = $this->ci->router->relativePathFor('getLink', ['id' => $bookmark->getId()]); 133 $redirect = $this->ci->router->pathFor('getLink', ['id' => $bookmark->getId()]);
134 return $response->withAddedHeader('Location', $redirect) 134 return $response->withAddedHeader('Location', $redirect)
135 ->withJson($out, 201, $this->jsonStyle); 135 ->withJson($out, 201, $this->jsonStyle);
136 } 136 }