summaryrefslogtreecommitdiff
path: root/public/update/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/update/index.php')
-rw-r--r--public/update/index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/public/update/index.php b/public/update/index.php
index fa6b482..50d0dcf 100644
--- a/public/update/index.php
+++ b/public/update/index.php
@@ -3,6 +3,7 @@
declare(strict_types=1);
use DTS\BookmarkRepository;
+use DTS\Session;
use function DTS\Functions\respondAndExit;
use function DTS\Functions\redirectAndExit;
@@ -10,6 +11,8 @@ require_once(__DIR__.'/../../autoload.php');
$config = require_once(__DIR__.'/../../config.php');
+$session = Session::getInstance();
+
if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') !== 'POST') {
respondAndExit(405, 'Method Not Allowed');
}
@@ -32,4 +35,6 @@ if (!$bookmarks->update($bookmark)) {
respondAndExit(500, 'Internal Server Error');
}
+$session->set('message', 'Bookmark Updated');
+
redirectAndExit('/');