Rating a book will now remove it from the list
This commit is contained in:
@@ -85,6 +85,8 @@ func PutRateUserBookHandler(ac appcontext.AppContext) {
|
||||
//if rated, set to "read" (a rating = 0 means unrated)
|
||||
if userbook.Rating > 0 {
|
||||
userbook.Read = true
|
||||
//if set to read, remove want read
|
||||
userbook.WantRead = false
|
||||
}
|
||||
ac.Db.Save(&userbook)
|
||||
ac.C.String(http.StatusOK, "Success")
|
||||
|
||||
Reference in New Issue
Block a user