File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 Capacity int
9494 Expiration struct {
9595 StaticFile time.Duration
96- Page time.Duration
9796 }
9897 }
9998
Original file line number Diff line number Diff line change 2828 capacity : 100000
2929 expiration :
3030 staticFile : " 4380h"
31- page : " 24h"
3231
3332database :
3433 driver : " sqlite3"
Original file line number Diff line number Diff line change 66
77 "github.com/go-playground/validator/v10"
88 "github.com/labstack/echo/v4"
9+ "github.com/mikestefanello/pagoda/config"
910 "github.com/mikestefanello/pagoda/ent"
1011 "github.com/mikestefanello/pagoda/ent/user"
1112 "github.com/mikestefanello/pagoda/pkg/context"
@@ -22,16 +23,18 @@ import (
2223)
2324
2425type Auth struct {
25- auth * services.AuthClient
26- mail * services.MailClient
27- orm * ent.Client
26+ config * config.Config
27+ auth * services.AuthClient
28+ mail * services.MailClient
29+ orm * ent.Client
2830}
2931
3032func init () {
3133 Register (new (Auth ))
3234}
3335
3436func (h * Auth ) Init (c * services.Container ) error {
37+ h .config = c .Config
3538 h .orm = c .ORM
3639 h .auth = c .Auth
3740 h .mail = c .Mail
@@ -111,7 +114,7 @@ func (h *Auth) ForgotPasswordSubmit(ctx echo.Context) error {
111114 Compose ().
112115 To (u .Email ).
113116 Subject ("Reset your password" ).
114- Body (fmt .Sprintf ("Go here to reset your password: %s" , url )).
117+ Body (fmt .Sprintf ("Go here to reset your password: %s" , h . config . App . Host + url )).
115118 Send (ctx )
116119
117120 if err != nil {
You can’t perform that action at this time.
0 commit comments