🐛 Fix userinfo insert into wrong table

This commit is contained in:
2024-09-14 21:43:50 +08:00
parent a131a5bf86
commit 20e399bb39
3 changed files with 5 additions and 6 deletions

View File

@ -54,10 +54,11 @@ func NewServer() {
Output: log.Logger,
}))
tablePrefix := viper.GetString("database.prefix")
app.Use(gap.H.AuthMiddleware)
app.Use(hyper.LinkAccountMiddleware[models.Account](
database.C,
&models.Account{},
tablePrefix+"accounts",
func(u hyper.BaseUser) models.Account {
return models.Account{
BaseUser: u,