Initial commit including .env
This commit is contained in:
16
scratch/check_user.go
Normal file
16
scratch/check_user.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
import (
|
||||
"fmt"
|
||||
"doormile/config"
|
||||
"doormile/db"
|
||||
"doormile/models"
|
||||
"github.com/joho/godotenv"
|
||||
)
|
||||
func main() {
|
||||
godotenv.Load()
|
||||
cfg := config.Load()
|
||||
db.Connect(cfg)
|
||||
var user models.AppUser
|
||||
db.DB.Where("email = ?", "doormile@gmail.com").First(&user)
|
||||
fmt.Printf("Authname=%s\n", user.Authname)
|
||||
}
|
||||
Reference in New Issue
Block a user