From: Philipp Holzer Date: Thu, 24 Oct 2019 15:18:29 +0000 (+0200) Subject: Rename route '/ignored/{iid}' to '/item/ignore/{iid}' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=062e47231437dfcc5df185bf50f82011eae31275;p=friendica.git Rename route '/ignored/{iid}' to '/item/ignore/{iid}' --- diff --git a/src/Module/Item/Ignore.php b/src/Module/Item/Ignore.php index 362b6c9baa..6a28310b40 100644 --- a/src/Module/Item/Ignore.php +++ b/src/Module/Item/Ignore.php @@ -30,7 +30,7 @@ class Ignore extends BaseModule /** @var Database $dba */ $dba = self::getClass(Database::class); - $message_id = intval($args->get(1)); + $message_id = intval($args->get(2)); if (empty($message_id) || !is_int($message_id)) { throw new HTTPException\BadRequestException(); diff --git a/static/routes.config.php b/static/routes.config.php index cce7789cd5..19d1b3156e 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -131,9 +131,13 @@ return [ '/hashtag' => [Module\Hashtag::class, [R::GET]], '/home' => [Module\Home::class, [R::GET]], '/help[/{doc:.+}]' => [Module\Help::class, [R::GET]], - '/ignored/{id}' => [Module\Item\Ignore::class, [R::GET]], '/inbox[/{nickname}]' => [Module\Inbox::class, [R::GET, R::POST]], - '/invite' => [Module\Invite::class, [R::GET, R::POST]], + + '/item' => [ + '/ignore/{id}' => [Module\Item\Ignore::class, [R::GET]], + ], + + '/invite' => [Module\Invite::class, [R::GET, R::POST]], '/install' => [ '[/]' => [Module\Install::class, [R::GET, R::POST]], diff --git a/view/js/main.js b/view/js/main.js index 47e7b968d0..40db7c2a13 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -629,7 +629,7 @@ function dostar(ident) { function doignore(ident) { ident = ident.toString(); $('#like-rotator-' + ident).show(); - $.get('ignored/' + ident, function(data) { + $.get('item/ignore/' + ident, function(data) { if (data.match(/1/)) { $('#ignored-' + ident).addClass('ignored'); $('#ignored-' + ident).removeClass('unignored');