Browse Source

Rename route '/ignored/{iid}' to '/item/ignore/{iid}'

pull/7762/head
Philipp Holzer 2 years ago
parent
commit
062e472314
No known key found for this signature in database GPG Key ID: D8365C3D36B77D90
  1. 2
      src/Module/Item/Ignore.php
  2. 8
      static/routes.config.php
  3. 2
      view/js/main.js

2
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();

8
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]],

2
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');

Loading…
Cancel
Save