Add fake API endpoint for creating leads

This commit is contained in:
Eli Ribble 2026-03-05 14:18:10 +00:00
parent 0f4ef9d2f8
commit 89197df6b0
No known key found for this signature in database
7 changed files with 85 additions and 10 deletions

View file

@ -261,9 +261,10 @@ func dashboard(ctx context.Context, w http.ResponseWriter, org *models.Organizat
return
}
html.RenderOrError(w, "sync/dashboard.html", contentAuthenticated[contentDashboard]{
C: content,
URL: html.NewContentURL(),
User: userContent,
C: content,
Organization: org,
URL: html.NewContentURL(),
User: userContent,
})
}

View file

@ -10,9 +10,12 @@ import (
"github.com/Gleipnir-Technology/nidus-sync/html"
nhttp "github.com/Gleipnir-Technology/nidus-sync/http"
"github.com/Gleipnir-Technology/nidus-sync/platform"
"github.com/gorilla/schema"
"github.com/rs/zerolog/log"
)
var decoder = schema.NewDecoder()
type handlerFunctionGet[T any] func(context.Context, *http.Request, *models.Organization, *models.User) (*html.Response[T], *nhttp.ErrorWithStatus)
type wrappedHandler func(http.ResponseWriter, *http.Request)
type contentAuthenticated[T any] struct {

View file

@ -12,7 +12,6 @@ import (
"github.com/Gleipnir-Technology/nidus-sync/db/models"
"github.com/Gleipnir-Technology/nidus-sync/html"
nhttp "github.com/Gleipnir-Technology/nidus-sync/http"
"github.com/gorilla/schema"
"github.com/rs/zerolog/log"
)
@ -35,8 +34,6 @@ func getSudo(ctx context.Context, r *http.Request, org *models.Organization, use
return html.NewResponse("sync/sudo.html", content), nil
}
var decoder = schema.NewDecoder()
type FormEmail struct {
Body string `schema:"emailBody"`
From string `schema:"emailFrom"`