Skip to content

Commit 3d0ef35

Browse files
authored
Merge pull request #320 from Saphyel/patch-1
Update BookSpecial class
2 parents 329710f + 988cc51 commit 3d0ef35

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/operations.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,6 @@ namespace AppBundle\Action;
430430

431431
use AppBundle\Entity\Book;
432432
use Doctrine\Common\Persistence\ManagerRegistry;
433-
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
434433
use Symfony\Component\Routing\Annotation\Route;
435434

436435
class BookSpecial
@@ -446,9 +445,9 @@ class BookSpecial
446445
* @Route(
447446
* name="book_special",
448447
* path="/books/{id}/special",
448+
* methods={"PUT"},
449449
* defaults={"_api_resource_class"=Book::class, "_api_item_operation_name"="special"}
450450
* )
451-
* @Method("PUT")
452451
*/
453452
public function __invoke($data) // API Platform retrieves the PHP entity using the data provider then (for POST and
454453
// PUT method) deserializes user data in it. Then passes it to the action. Here $data

0 commit comments

Comments
 (0)