🐛 Fix userinfo insert into wrong table

This commit is contained in:
2024-09-14 21:37:14 +08:00
parent 14e3750bd9
commit 5b78292d1b
3 changed files with 5 additions and 2 deletions

View File

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