NewsController: redirect after edit to /news instead of /news/[id]

This commit is contained in:
Xu 2020-12-18 17:52:45 +01:00 committed by Igor Scheller
parent b77c163aad
commit ab82e1cbc0
2 changed files with 2 additions and 2 deletions

View File

@ -164,6 +164,6 @@ class NewsController extends BaseController
$this->addNotification('news.edit.success');
return $this->redirect->to('/news/' . $news->id);
return $this->redirect->to('/news');
}
}

View File

@ -204,7 +204,7 @@ class NewsControllerTest extends TestCase
->willReturn($canEditHtml);
$this->response->expects($this->once())
->method('redirectTo')
->with('http://localhost/news/' . $id)
->with('http://localhost/news')
->willReturn($this->response);
/** @var NewsController $controller */