mirror of
https://github.com/wallabag/wallabag.git
synced 2025-02-17 03:05:19 +00:00
skeleton for DELETE and PATCH methods
This commit is contained in:
parent
3e5a342f65
commit
38ba7ed972
1 changed files with 36 additions and 2 deletions
|
@ -6,17 +6,19 @@ use Nelmio\ApiDocBundle\Annotation\ApiDoc;
|
|||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use Wallabag\CoreBundle\Entity\Entries;
|
||||
use FOS\RestBundle\Controller\Annotations\Get;
|
||||
use FOS\RestBundle\Controller\Annotations\Delete;
|
||||
use FOS\RestBundle\Controller\Annotations\Patch;
|
||||
use Wallabag\CoreBundle\Entity\Users;
|
||||
|
||||
class EntryController extends Controller
|
||||
{
|
||||
/**
|
||||
* Fetch an entry for a given user
|
||||
* Fetches an entry for a given user
|
||||
*
|
||||
* @Get("/u/{user}/entry/{entry}")
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="user", "dataType"="string", "requirement"="\w+", "description"="The username"},
|
||||
* {"name"="user", "dataType"="string", "requirement"="\w+", "description"="The user ID"},
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
|
@ -26,4 +28,36 @@ class EntryController extends Controller
|
|||
{
|
||||
return $entry;
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an entry for a given user
|
||||
*
|
||||
* @Delete("/u/{user}/entry/{entry}")
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="user", "dataType"="string", "requirement"="\w+", "description"="The user ID"},
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
public function deleteAction(Users $user, Entries $entry)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes several properties of an entry. I.E tags, archived, starred and deleted status
|
||||
*
|
||||
* @Patch("/u/{user}/entry/{entry}")
|
||||
* @ApiDoc(
|
||||
* requirements={
|
||||
* {"name"="user", "dataType"="string", "requirement"="\w+", "description"="The user ID"},
|
||||
* {"name"="entry", "dataType"="integer", "requirement"="\w+", "description"="The entry ID"}
|
||||
* }
|
||||
* )
|
||||
*/
|
||||
public function patchAction(Users $user, Entries $entry)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue