Преглед на файлове

feat: update log search

CalciumIon преди 1 година
родител
ревизия
12da7f64cd
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      model/log.go

+ 1 - 1
model/log.go

@@ -102,7 +102,7 @@ func GetAllLogs(logType int, startTimestamp int64, endTimestamp int64, modelName
 		tx = DB.Where("type = ?", logType)
 	}
 	if modelName != "" {
-		tx = tx.Where("model_name = ?", modelName)
+		tx = tx.Where("model_name like ?", "%"+modelName+"%")
 	}
 	if username != "" {
 		tx = tx.Where("username = ?", username)