Add access token check to auth
This commit is contained in:
parent
8f53e8a967
commit
6a2b213787
4 changed files with 34 additions and 7 deletions
|
@ -18,12 +18,6 @@ import (
|
|||
"git.mstar.dev/mstar/linstrom/storage-new/models"
|
||||
)
|
||||
|
||||
const (
|
||||
dbName = "linstrom"
|
||||
dbUser = "linstrom"
|
||||
dbPass = "linstrom"
|
||||
)
|
||||
|
||||
func main() {
|
||||
other.SetupFlags()
|
||||
flag.Parse()
|
||||
|
@ -32,7 +26,6 @@ func main() {
|
|||
|
||||
db, err := gorm.Open(
|
||||
postgres.Open(config.GlobalConfig.Storage.BuildPostgresDSN()),
|
||||
// postgres.Open(pgContainer.MustConnectionString(context.Background())),
|
||||
&gorm.Config{
|
||||
PrepareStmt: false,
|
||||
Logger: shared.NewGormLogger(log.Logger),
|
||||
|
@ -54,6 +47,7 @@ func main() {
|
|||
log.Info().Msg("Basic operations applied, applying extra features")
|
||||
g.ApplyInterface(func(models.INotification) {}, models.Notification{})
|
||||
g.ApplyInterface(func(models.IUser) {}, models.User{})
|
||||
g.ApplyInterface(func(models.IAccessToken) {}, models.AccessToken{})
|
||||
|
||||
log.Info().Msg("Extra features applied, starting generation")
|
||||
g.Execute()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue