]> git.mxchange.org Git - friendica.git/commitdiff
Rename route '/ignored/{iid}' to '/item/ignore/{iid}'
authorPhilipp Holzer <admin+github@philipp.info>
Thu, 24 Oct 2019 15:18:29 +0000 (17:18 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Thu, 24 Oct 2019 15:18:29 +0000 (17:18 +0200)
src/Module/Item/Ignore.php
static/routes.config.php
view/js/main.js

index 362b6c9baa06aa373e5b8c66190d7632ee538398..6a28310b401146e8a4db4f5c749575d8b244a7c5 100644 (file)
@@ -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();
index cce7789cd5150edb9ad3dd49f5d5d5e5b2ebe25b..19d1b3156ea0d16cb510cda0790490ac0ede8043 100644 (file)
@@ -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]],
index 47e7b968d08637d09c459fedd1d048f92f297711..40db7c2a13cfb2b9d6223004a0f5815f8ef42c0e 100644 (file)
@@ -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');