This commit is contained in:
Mrx
2026-02-28 12:45:25 +08:00
parent ed35631900
commit 6a627dc474
3 changed files with 28 additions and 7 deletions

View File

@@ -1,6 +1,7 @@
package auth
import (
"context"
"net/http"
"tyc-server/app/main/api/internal/logic/auth"
@@ -23,7 +24,8 @@ func SendSmsHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
result.ParamValidateErrorResult(r, w, err)
return
}
l := auth.NewSendSmsLogic(r.Context(), svcCtx)
ctx := context.WithValue(r.Context(), auth.UserAgentContextKey, r.Header.Get("User-Agent"))
l := auth.NewSendSmsLogic(ctx, svcCtx)
err := l.SendSms(&req)
result.HttpResult(r, w, nil, err)
}