diff options
Diffstat (limited to 'public/store')
| -rw-r--r-- | public/store/index.php | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/public/store/index.php b/public/store/index.php index 2a84c59..45765d5 100644 --- a/public/store/index.php +++ b/public/store/index.php @@ -4,13 +4,16 @@ declare(strict_types=1);  use DTS\Bookmark;  use DTS\BookmarkRepository; -use function DTS\Functions\respondAndExit; +use DTS\Session;  use function DTS\Functions\redirectAndExit; +use function DTS\Functions\respondAndExit;  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');  } @@ -30,4 +33,6 @@ if (!$bookmarks->add($bookmark)) {      respondAndExit(500, 'Internal Server Error');  } +$session->set('message', 'Bookmark Added'); +  redirectAndExit('/');  | 
