Skip to content

Wrong return-type in AlbumRestController.php in the update() #1

Description

@roman-1983

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),
    ));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions