feat: 接入短信服务,修复 SMS 客户端 API 路径
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled

- cmd/api/main.go: 新增 initSMS() 初始化短信客户端并注入 verificationService
- pkg/sms/client.go: 修复 API 路径缺少 /sms 前缀(/api/... → /sms/api/...)
- docker-compose.prod.yml: 添加线上短信服务环境变量
This commit is contained in:
2026-03-21 10:51:43 +08:00
parent 284f6c15c7
commit da66e673fe
3 changed files with 39 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ func (c *Client) SendMessage(ctx context.Context, content string, phones []strin
)
// 发送请求
url := c.gatewayURL + "/api/sendMessageMass"
url := c.gatewayURL + "/sms/api/sendMessageMass"
// 创建带超时的上下文
reqCtx, cancel := context.WithTimeout(ctx, c.timeout)