feat: WIP auth mailing implementation

This commit is contained in:
Florian Sylvain
2024-05-13 19:22:56 +02:00
parent d146363246
commit 8015639db5
13 changed files with 139 additions and 113 deletions
+10
View File
@@ -3,6 +3,7 @@ package route
import (
"GohCMS2/api"
"encoding/json"
"fmt"
"github.com/MadAppGang/httplog"
"github.com/go-chi/chi/v5"
"github.com/go-chi/cors"
@@ -33,6 +34,15 @@ func InitJwt() {
}
func GetHelloWorld(w http.ResponseWriter, _ *http.Request) {
err := api.Container.SendMailUseCase.SendMail(
"floriansylvainpro@gmail.com",
"mailValidation",
struct{}{},
)
if err != nil {
fmt.Println(err)
}
msg, _ := json.Marshal(map[string]string{"message": "Hello World"})
_, _ = w.Write(msg)
}