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

This commit is contained in:
Philipp Holzer 2019-10-24 17:18:29 +02:00
parent 5aa73afa7e
commit 062e472314
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90
3 changed files with 8 additions and 4 deletions

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

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

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