summaryrefslogtreecommitdiff
path: root/internal/router/handlers/api-v1-email-send-verification-code.go
diff options
from:
to:
context:
space:
mode:
authorGravatar SayaAndy <saya.andy@posteo.com> 2026-05-02 14:29:55 +0700
committerGravatar SayaAndy <saya.andy@posteo.com> 2026-05-02 14:29:55 +0700
commitca1f36376865cb2a20923aa62fdff3ee217abde3 (patch)
tree2e3676489327505dd2b4d53023ca0da6fc2dc5a2 /internal/router/handlers/api-v1-email-send-verification-code.go
parent3898baa47faf268864ecac3699f7e98c6cac01a4 (diff)
downloadweb-ca1f36376865cb2a20923aa62fdff3ee217abde3.tar.gz
web-ca1f36376865cb2a20923aa62fdff3ee217abde3.zip
feat: implement rate limiting
Diffstat (limited to 'internal/router/handlers/api-v1-email-send-verification-code.go')
-rw-r--r--internal/router/handlers/api-v1-email-send-verification-code.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/router/handlers/api-v1-email-send-verification-code.go b/internal/router/handlers/api-v1-email-send-verification-code.go
index 20c5fb6..0b53efa 100644
--- a/internal/router/handlers/api-v1-email-send-verification-code.go
+++ b/internal/router/handlers/api-v1-email-send-verification-code.go
@@ -38,6 +38,10 @@ func (r *SendVerificationCodeHandler) ToValidateLang() router.LangSetting {
return router.InReferer
}
+func (r *SendVerificationCodeHandler) RateLimiter() *fiber.Handler {
+ return &router.RateLimiterStrict
+}
+
func (r *SendVerificationCodeHandler) Render(c *fiber.Ctx, supplements *router.Supplements, lang string, templateMap fiber.Map) (statusCode int, err error) {
id := c.IP()
templateMap["StatusId"] = "email-message"