8 files changed,
23 insertions(+),
23 deletions(-)
Author:
Smirnov Oleksandr
ss2316544@gmail.com
Committed by:
GitHub
noreply@github.com
Committed at:
2024-09-26 22:48:37 +0300
Parent:
88565e9
M
cmd/server/main.go
@@ -75,7 +75,7 @@ sha256Hasher,
jwtTokenizer, mailGunMailer, cfg.JwtRefreshTokenTTL, - cfg.VerficationTokenTTL, + cfg.VerificationTokenTTL, cfg.AppURL, )
M
e2e/e2e_test.go
@@ -110,7 +110,7 @@ e.hasher,
e.jwtTokenizer, e.mailer, cfg.JwtRefreshTokenTTL, - cfg.VerficationTokenTTL, + cfg.VerificationTokenTTL, cfg.AppURL, )@@ -175,16 +175,16 @@ }
func (e *AppTestSuite) getConfig() *config.Config { return &config.Config{ //nolint:exhaustruct - AppEnv: "testing", - AppURL: "", - ServerPort: "3000", - PasswordSalt: "salty-password", - JwtSigningKey: "jwt-key", - JwtAccessTokenTTL: time.Hour, - JwtRefreshTokenTTL: 24 * time.Hour, - VerficationTokenTTL: 24 * time.Hour, - LogShowLine: os.Getenv("LOG_SHOW_LINE") == "true", - LogFormat: "text", - LogLevel: "debug", + AppEnv: "testing", + AppURL: "", + ServerPort: "3000", + PasswordSalt: "salty-password", + JwtSigningKey: "jwt-key", + JwtAccessTokenTTL: time.Hour, + JwtRefreshTokenTTL: 24 * time.Hour, + VerificationTokenTTL: 24 * time.Hour, + LogShowLine: os.Getenv("LOG_SHOW_LINE") == "true", + LogFormat: "text", + LogLevel: "debug", } }
M
internal/config/config.go
@@ -17,10 +17,10 @@ JwtSigningKey string
JwtAccessTokenTTL time.Duration JwtRefreshTokenTTL time.Duration - MailgunFrom string - MailgunDomain string - MailgunAPIKey string - VerficationTokenTTL time.Duration + MailgunFrom string + MailgunDomain string + MailgunAPIKey string + VerificationTokenTTL time.Duration LogLevel string LogFormat string@@ -46,7 +46,7 @@
MailgunFrom: getenvOrDefault("MAILGUN_FROM", ""), MailgunDomain: getenvOrDefault("MAILGUN_DOMAIN", ""), MailgunAPIKey: getenvOrDefault("MAILGUN_API_KEY", ""), - VerficationTokenTTL: mustParseDurationOrPanic( + VerificationTokenTTL: mustParseDurationOrPanic( getenvOrDefault("VERIFICATION_TOKEN_TTL", "24h"), ),
M
internal/dtos/user.go
@@ -17,7 +17,7 @@ LastLoginAt time.Time
} type ResetUserPasswordDTO struct { - // NOTE: probablbe userID shouldn't be here + // NOTE: probably userID shouldn't be here UserID uuid.UUID CurrentPassword string NewPassword string
M
internal/service/notesrv/notesrv.go
@@ -10,7 +10,7 @@ "github.com/olexsmir/onasty/internal/store/psql/noterepo"
) type NoteServicer interface { - // Create create note + // Create creates note // if slug is empty it will be generated, otherwise used as is // if userID is empty it means user isn't authorized so it will be used Create(ctx context.Context, note dtos.CreateNoteDTO, userID uuid.UUID) (dtos.NoteSlugDTO, error)
M
internal/service/usersrv/usersrv.go
@@ -94,7 +94,7 @@ return uuid.Nil, err
} // TODO: handle the error that might be returned - // i dont think that tehre's need to handle the error, just log it + // i dont think that there's need to handle the error, just log it bgCtx, bgCancel := context.WithTimeout(context.Background(), 10*time.Second) go u.sendVerificationEmail( //nolint:errcheck,contextcheck bgCtx,
M
internal/store/psql/userepo/userepo.go
@@ -16,7 +16,7 @@ type UserStorer interface {
Create(ctx context.Context, inp dtos.CreateUserDTO) (uuid.UUID, error) // GetUserByCredentials returns user by email and password - // password should be hashed + // the password should be hashed GetUserByCredentials(ctx context.Context, email, password string) (dtos.UserDTO, error) GetUserIDByEmail(ctx context.Context, email string) (uuid.UUID, error)
M
internal/transport/http/reqid/reqid.go
@@ -25,7 +25,7 @@ rid = uuid.Must(uuid.NewV4()).String()
c.Request.Header.Add(headerRequestID, rid) } - // set reqeust ID request context + // set request ID request context ctx := context.WithValue(c.Request.Context(), RequestID, rid) c.Request = c.Request.WithContext(ctx)