API: improve validation message greater/lower than
Add translation and return a better error for lower than
This commit is contained in:
@@ -68,6 +68,7 @@ func PutUserBookHandler(ac appcontext.AppContext) {
|
||||
err = validateRating(*userBookPut.Rating)
|
||||
if err != nil {
|
||||
myvalidator.ReturnErrorsAsJsonResponse(&ac, err)
|
||||
return
|
||||
}
|
||||
updateRating(&userbook, &userBookPut)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user