1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-06-13 00:41:59 +03:00

Organised activity types and moved most to repos

Repos are generally better since otherwise we end up duplicating
things between front-end and API.

Types moved to by CONST values within a class for better visibilty
of usage and listing of types.
This commit is contained in:
Dan Brown
2020-11-07 22:37:27 +00:00
parent 4824ef2760
commit c157dc3490
19 changed files with 76 additions and 73 deletions

View File

@ -2,6 +2,7 @@
namespace BookStack\Http\Controllers;
use BookStack\Actions\ActivityType;
use BookStack\Entities\Book;
use BookStack\Entities\Managers\BookContents;
use BookStack\Entities\Repos\BookRepo;
@ -74,7 +75,7 @@ class BookSortController extends Controller
// Rebuild permissions and add activity for involved books.
$booksInvolved->each(function (Book $book) {
Activity::add($book, 'book_sort', $book->id);
Activity::add($book, ActivityType::BOOK_SORT, $book->id);
});
return redirect($book->getUrl());