1
0
forked from baron/baron-sso

Merge pull request 'SMS API 전화번호 형식 오류 수정' (#38) from dev/sso-from-placeholder into main

Reviewed-on: ai-team/baron-sso#38
This commit is contained in:
2026-01-16 10:15:35 +09:00

View File

@@ -43,6 +43,9 @@ func (s *SmsServiceImpl) SendSms(to, content string) error {
apiURL := fmt.Sprintf("https://sens.apigw.ntruss.com/sms/v2/services/%s/messages", s.serviceID)
log.Printf("Requesting SENS API URL: %s", apiURL)
// Naver SENS API requires phone number without '+'
sanitizedTo := strings.Replace(to, "+", "", 1)
reqBody := domain.NaverSmsRequest{
Type: "SMS",
ContentType: "COMM",
@@ -51,7 +54,7 @@ func (s *SmsServiceImpl) SendSms(to, content string) error {
Content: content,
Messages: []domain.SmsMessage{
{
To: to,
To: sanitizedTo,
},
},
}