Compare commits

...

4 Commits

Author SHA1 Message Date
Zin Bo Thit
ad1e960e71 Fix gateway SMS API routes
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
2026-08-03 15:36:38 +06:30
Zin Bo Thit
3eaded1033 Queue OTP SMS messages for delivery
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
2026-08-03 14:58:20 +06:30
Zin Bo Thit
6678a5b919 Merge branch 'main' of https://git.qikbite.asia/minzeyaphyo/MySMSAPio into main
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled
2026-08-03 14:38:05 +06:30
Zin Bo Thit
ce49a72e01 Fix OTP API routes 2026-08-03 14:37:51 +06:30
2 changed files with 6 additions and 9 deletions

View File

@@ -54,7 +54,8 @@ class OtpCode < ApplicationRecord
sms = SmsMessage.create!(
direction: "outbound",
phone_number: normalized_phone,
message_body: "Your OTP code is: #{otp.code}. Valid for #{expiry_minutes} minutes. Do not share this code."
message_body: "Your OTP code is: #{otp.code}. Valid for #{expiry_minutes} minutes. Do not share this code.",
status: "queued"
)
{ otp: otp, sms: sms }

View File

@@ -13,10 +13,8 @@ Rails.application.routes.draw do
post "register", to: "registrations#create"
post "heartbeat", to: "heartbeats#create"
namespace :sms do
post "received", to: "sms#received"
post "status", to: "sms#status"
end
post "sms/received", to: "sms#received"
post "sms/status", to: "sms#status"
end
# Client application endpoints
@@ -25,10 +23,8 @@ Rails.application.routes.draw do
get "sms/received", to: "sms#received"
# OTP endpoints
namespace :otp do
post "send", to: "otp#send_otp"
post "verify", to: "otp#verify"
end
post "otp/send", to: "otp#send_otp"
post "otp/verify", to: "otp#verify"
# Admin endpoints
namespace :admin do