feat(api): add phone number registration endpoint and update related logic
Some checks failed
CI / Test (1.23) (push) Failing after -21m47s
CI / Test (1.22) (push) Failing after -21m38s
CI / Lint (push) Failing after -21m58s
CI / Build (push) Failing after -22m23s

This commit is contained in:
2026-02-21 00:04:16 +02:00
parent 8732b332a1
commit 4a716bb82d
10 changed files with 275 additions and 43 deletions

View File

@@ -224,6 +224,7 @@ func SetupWhatsAppRoutes(router *mux.Router, wh WhatsHookedInterface, distFS fs.
router.HandleFunc("/api/phone-numbers", h.Auth(h.ListPhoneNumbers))
router.HandleFunc("/api/phone-numbers/request-code", h.Auth(h.RequestVerificationCode)).Methods("POST")
router.HandleFunc("/api/phone-numbers/verify-code", h.Auth(h.VerifyCode)).Methods("POST")
router.HandleFunc("/api/phone-numbers/register", h.Auth(h.RegisterPhoneNumber)).Methods("POST")
// Media management (with auth)
router.HandleFunc("/api/media/upload", h.Auth(h.UploadMedia)).Methods("POST")