mirror of
https://github.com/flarum/core.git
synced 2025-10-19 02:36:08 +02:00
Implement notifications
This commit is contained in:
@@ -11,6 +11,13 @@ $action = function ($class) {
|
||||
|
||||
Route::group(['prefix' => 'api', 'middleware' => 'Flarum\Api\Middleware\LoginWithHeader'], function () use ($action) {
|
||||
|
||||
// Get forum information
|
||||
Route::get('forum', [
|
||||
'as' => 'flarum.api.forum.show',
|
||||
'uses' => $action('Flarum\Api\Actions\Forum\ShowAction')
|
||||
]);
|
||||
|
||||
// Retrieve authentication token
|
||||
Route::post('token', [
|
||||
'as' => 'flarum.api.token',
|
||||
'uses' => $action('Flarum\Api\Actions\TokenAction')
|
||||
@@ -70,6 +77,12 @@ Route::group(['prefix' => 'api', 'middleware' => 'Flarum\Api\Middleware\LoginWit
|
||||
'uses' => $action('Flarum\Api\Actions\Notifications\IndexAction')
|
||||
]);
|
||||
|
||||
// Mark a single notification as read
|
||||
Route::put('notifications/{id}', [
|
||||
'as' => 'flarum.api.notifications.update',
|
||||
'uses' => $action('Flarum\Api\Actions\Notifications\UpdateAction')
|
||||
]);
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Discussions
|
||||
|
Reference in New Issue
Block a user