Add fake API endpoint for creating leads
This commit is contained in:
parent
0f4ef9d2f8
commit
89197df6b0
7 changed files with 85 additions and 10 deletions
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue