Rating a book will now remove it from the list

This commit is contained in:
2025-11-18 18:41:47 +01:00
parent 59f6635f1b
commit 4cbddfb15f
3 changed files with 16 additions and 0 deletions

View File

@@ -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")