diff --git a/student/db.document.go b/student/db.document.go index 5ad2037..3362903 100644 --- a/student/db.document.go +++ b/student/db.document.go @@ -33,6 +33,6 @@ func getDocumentsByType(ctx *gin.Context, documents *[]StudentDocument, docType func updateDocumentVerify(ctx *gin.Context, docid uint, verified bool, user string) (bool, error){ var document StudentDocument - tx := db.WithContext(ctx).Model(&document).Clauses(clause.Returning{}).Where("id = ?", docid).Update("verified", verified).Update("action_taken_by", user) + tx := db.WithContext(ctx).Model(&document).Clauses(clause.Returning{}).Where("id = ?", docid).Updates(map[string]interface{}{"verified": verified, "action_taken_by": user}) return tx.RowsAffected == 1, tx.Error } \ No newline at end of file