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

This commit is contained in:
JustSong
2023-06-24 15:28:11 +08:00
parent b0bfb9c9a1
commit cccf5e4a07
8 changed files with 392 additions and 146 deletions

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
}