Cleanup configuration.
This commit is contained in:
parent
77cabe5f12
commit
a53bdf9a1b
3 changed files with 7 additions and 6 deletions
|
|
@ -93,7 +93,6 @@ type (
|
|||
Capacity int
|
||||
Expiration struct {
|
||||
StaticFile time.Duration
|
||||
Page time.Duration
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ cache:
|
|||
capacity: 100000
|
||||
expiration:
|
||||
staticFile: "4380h"
|
||||
page: "24h"
|
||||
|
||||
database:
|
||||
driver: "sqlite3"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
"github.com/go-playground/validator/v10"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/mikestefanello/pagoda/config"
|
||||
"github.com/mikestefanello/pagoda/ent"
|
||||
"github.com/mikestefanello/pagoda/ent/user"
|
||||
"github.com/mikestefanello/pagoda/pkg/context"
|
||||
|
|
@ -22,6 +23,7 @@ import (
|
|||
)
|
||||
|
||||
type Auth struct {
|
||||
config *config.Config
|
||||
auth *services.AuthClient
|
||||
mail *services.MailClient
|
||||
orm *ent.Client
|
||||
|
|
@ -32,6 +34,7 @@ func init() {
|
|||
}
|
||||
|
||||
func (h *Auth) Init(c *services.Container) error {
|
||||
h.config = c.Config
|
||||
h.orm = c.ORM
|
||||
h.auth = c.Auth
|
||||
h.mail = c.Mail
|
||||
|
|
@ -111,7 +114,7 @@ func (h *Auth) ForgotPasswordSubmit(ctx echo.Context) error {
|
|||
Compose().
|
||||
To(u.Email).
|
||||
Subject("Reset your password").
|
||||
Body(fmt.Sprintf("Go here to reset your password: %s", url)).
|
||||
Body(fmt.Sprintf("Go here to reset your password: %s", h.config.App.Host+url)).
|
||||
Send(ctx)
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue