feat: 接入短信服务,修复 SMS 客户端 API 路径
Some checks failed
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Has been cancelled
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user