mirror of
https://github.com/KevinMidboe/planetposen-mail.git
synced 2025-10-29 17:50:32 +00:00
Mail api for sending order confirmation to planetposen customers
This commit is contained in:
14
server/router.go
Normal file
14
server/router.go
Normal 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")
|
||||
}
|
||||
Reference in New Issue
Block a user