AlbumRest
AlbumRest copied to clipboard
Wrong return-type in AlbumRestController.php in the update()
There is an error in the AlbumRestController.php in the update() function. It should not return a JsonModel but only the result of the get() because get() already returns a JsonModel.
public function update($id, $data)
{
// code here
return $this->get($id);
}
instead of
public function update($id, $data)
{
// code here
return new JsonModel(array(
'data' => $this->get($id),
));
}
Hi, thx for noticing this. Sorry i did not check earlier was quite busy. Would it be possible to send in a pr?
Ithem with create function
Hi, thanks for the explanation in restful implementation of album, i have a small doubt on the above, being simply return as a json data, can we say its implemented in restful?