flash call

This commit is contained in:
2025-12-03 19:45:24 +03:00
parent 85cbc3e940
commit 1bc08c90bd
5 changed files with 122 additions and 84 deletions

6
sms.go
View File

@@ -23,11 +23,6 @@ var (
TypeSMS = "sms"
)
type Payload struct {
Sender string `json:"sender"`
Text string `json:"text"`
}
type SendSMSResponse struct {
Error string `json:"error"`
ID uuid.UUID `json:"id"`
@@ -84,7 +79,6 @@ func SendSMSWait(apiKey, phone, sender, text string) (transactionID uuid.UUID, e
for resp.Status == "pending" {
time.Sleep(time.Millisecond * 100)
sResp, err = RequestStatus(resp.ID, apiKey)
log.Println(sResp.State.Status, err)
if err != nil {
return
}