]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Repos/BookshelfRepo.php
Removed use of book_id in activity
[bookstack] / app / Entities / Repos / BookshelfRepo.php
index 2c80b2a7d2bf58c6ab8e5cf8c9323ade856c92e9..7cd333ff36d2ffd8aaaaabe7580639e94d8487e2 100644 (file)
@@ -89,7 +89,7 @@ class BookshelfRepo
         $shelf = new Bookshelf();
         $this->baseRepo->create($shelf, $input);
         $this->updateBooks($shelf, $bookIds);
-        Activity::add($shelf, ActivityType::BOOKSHELF_CREATE);
+        Activity::addForEntity($shelf, ActivityType::BOOKSHELF_CREATE);
         return $shelf;
     }
 
@@ -104,7 +104,7 @@ class BookshelfRepo
             $this->updateBooks($shelf, $bookIds);
         }
 
-        Activity::add($shelf, ActivityType::BOOKSHELF_UPDATE);
+        Activity::addForEntity($shelf, ActivityType::BOOKSHELF_UPDATE);
         return $shelf;
     }
 
@@ -179,7 +179,7 @@ class BookshelfRepo
     {
         $trashCan = new TrashCan();
         $trashCan->softDestroyShelf($shelf);
-        Activity::add($shelf, ActivityType::BOOKSHELF_DELETE);
+        Activity::addForEntity($shelf, ActivityType::BOOKSHELF_DELETE);
         $trashCan->autoClearOld();
     }
 }