Mail api for sending order confirmation to planetposen customers

This commit is contained in:
2022-12-02 18:26:07 +01:00
commit 2812f6bcbf
13 changed files with 782 additions and 0 deletions

14
server/router.go Normal file
View File

@@ -0,0 +1,14 @@
package server
import (
"github.com/kevinmidboe/planetposen-mail/server/handler"
)
const v1API string = "/api/v1/"
func (s *Server) setupRoutes() {
s.Router.HandleFunc("/_healthz", handler.Healthz).Methods("GET").Name("Health")
api := s.Router.PathPrefix(v1API).Subrouter()
api.HandleFunc("/send-confirmation", handler.SendOrderConfirmation(s.SendGrid)).Methods("POST").Name("SendOrderConfirmation")
}