feat: able to query logs now (close #144)

This commit is contained in:
JustSong
2023-06-24 15:28:11 +08:00
parent e4281857b0
commit e4f7ac4089
8 changed files with 392 additions and 146 deletions
+5
View File
@@ -303,3 +303,8 @@ func UpdateUserUsedQuotaAndRequestCount(id int, quota int) {
common.SysError("failed to update user used quota and request count: " + err.Error())
}
}
func GetUsernameById(id int) (username string) {
DB.Model(&User{}).Where("id = ?", id).Select("username").Find(&username)
return username
}