feat(identity): register accounts and resend verification mail

This commit is contained in:
shira committed 2026-10-06 23:59:51 +03:00
1 parent 5e202ac972
commit 4436f626a3
55 files changed
+3227 -88

No files matched your search

@@ -0,0 +1,22 @@
package problem
import (
"context"
"lincodex/backend/internal/adapter/primary/http/api"
)
// InvalidField is the validation_failed problem for one invalid value that
// only the application can detect, such as a stale consent text version. The
// pointer is a JSON Pointer into the location of the value; the body of the
// problem never echoes the value.
func InvalidField(ctx context.Context, location api.ProblemFieldLocation, pointer string) *api.ProblemStatusCode {
return validationProblem(ctx, []api.ProblemFieldError{fieldError(location, pointer, fieldCodeInvalid)})
}
// RateLimited is the 429 problem with the wait before a retry. The wait is
// rounded up to whole seconds, at least one.
func RateLimited(ctx context.Context, waitSeconds int32) *api.TooManyRequestsHeaders {
problem := New(ctx, api.ProblemCodeRateLimited)
return &api.TooManyRequestsHeaders{RetryAfter: api.NewOptInt32(max(waitSeconds, 1)), Response: problem.Response}
}