feat: resolve user pages malfunction after using tableNamePrefix (#1945)

This commit is contained in:
XDTD
2023-06-08 00:43:05 +08:00
committed by GitHub
parent f2e3182a69
commit e93d8c19d9

View File

@ -305,7 +305,8 @@ func GetSessionForUser(owner string, offset, limit int, field, value, sortField,
sortField = "created_time"
}
tableName := "user"
tableNamePrefix := conf.GetConfigString("tableNamePrefix")
tableName := tableNamePrefix + "user"
if offset == -1 {
if sortOrder == "ascend" {
session = session.Asc(util.SnakeString(sortField))