1
0
mirror of https://github.com/flarum/core.git synced 2025-10-19 02:36:08 +02:00

Implement notifications

This commit is contained in:
Toby Zerner
2015-03-24 15:07:38 +10:30
parent 1d1025dcd2
commit 4a1550215c
34 changed files with 808 additions and 38 deletions

View File

@@ -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