API: Provide forum info under /

Closes #875.
This commit is contained in:
Franz Liedke 2018-02-11 16:38:02 +01:00
parent 160493e725
commit f0cea11e79
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4
2 changed files with 2 additions and 2 deletions

View File

@ -2,6 +2,6 @@ import Model from 'flarum/Model';
export default class Forum extends Model { export default class Forum extends Model {
apiEndpoint() { apiEndpoint() {
return '/forum'; return '/';
} }
} }

View File

@ -16,7 +16,7 @@ use Flarum\Http\RouteHandlerFactory;
return function (RouteCollection $map, RouteHandlerFactory $route) { return function (RouteCollection $map, RouteHandlerFactory $route) {
// Get forum information // Get forum information
$map->get( $map->get(
'/forum', '/',
'forum.show', 'forum.show',
$route->toController(Controller\ShowForumController::class) $route->toController(Controller\ShowForumController::class)
); );