Implemented common parameter validation
This commit is contained in:
@@ -21,10 +21,7 @@ func (c *GetCoverArtController) Prepare() {
|
||||
}
|
||||
|
||||
func (c *GetCoverArtController) Get() {
|
||||
id := c.Input().Get("id")
|
||||
if id == "" {
|
||||
c.SendError(responses.ERROR_MISSING_PARAMETER, "id parameter required")
|
||||
}
|
||||
id := c.ValidateParameters("id", "id parameter required")
|
||||
|
||||
mf, err := c.repo.Get(id)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user