Add vendor risk assement

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-04-22 08:03:35 -07:00
parent f038642ece
commit e2e8f38f97
17 changed files with 1275 additions and 582 deletions

View File

@@ -19,6 +19,7 @@ import (
"fmt"
"net/http"
"github.com/getprobo/probo/pkg/probo"
"github.com/getprobo/probo/pkg/usrmgr"
"go.gearno.de/kit/httpserver"
)
@@ -33,7 +34,7 @@ type (
}
)
func InvitationConfirmationHandler(usrmgrSvc *usrmgr.Service, authCfg AuthConfig) http.HandlerFunc {
func InvitationConfirmationHandler(usrmgrSvc *usrmgr.Service, proboSvc *probo.Service, authCfg AuthConfig) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
var req InvitationConfirmationRequest
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
@@ -41,7 +42,7 @@ func InvitationConfirmationHandler(usrmgrSvc *usrmgr.Service, authCfg AuthConfig
return
}
err := usrmgrSvc.ConfirmInvitation(r.Context(), req.Token, req.Password)
_, err := usrmgrSvc.ConfirmInvitation(r.Context(), req.Token, req.Password)
if err != nil {
httpserver.RenderError(w, http.StatusInternalServerError, err)
return