Cleanup container init.
This commit is contained in:
parent
8657380530
commit
e5038f7bbf
3 changed files with 27 additions and 16 deletions
|
|
@ -31,7 +31,7 @@ func (l *Login) Post(c echo.Context) error {
|
|||
return l.Get(c)
|
||||
}
|
||||
|
||||
u, err := l.Container.Ent.User.
|
||||
u, err := l.Container.ORM.User.
|
||||
Query().
|
||||
Where(user.Username(name)).
|
||||
First(c.Request().Context())
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ func (r *Register) Post(c echo.Context) error {
|
|||
}
|
||||
|
||||
// Attempt creating the user
|
||||
u, err := r.Container.Ent.User.
|
||||
u, err := r.Container.ORM.User.
|
||||
Create().
|
||||
SetUsername(form.Username).
|
||||
SetPassword(string(pwHash)).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue