@@ -87,9 +87,7 @@ func AcceptInvitationHandler(authSvc *authsvc.Service, authzSvc *authz.Service,
|
||||
return
|
||||
}
|
||||
|
||||
response := AcceptInvitationResponse{
|
||||
InvitationID: req.InvitationID,
|
||||
}
|
||||
response := AcceptInvitationResponse(req)
|
||||
|
||||
httpserver.RenderJSON(w, http.StatusOK, response)
|
||||
}
|
||||
|
||||
@@ -75,9 +75,7 @@ func DeleteUserAPIKeyHandler(authSvc *authsvc.Service) http.HandlerFunc {
|
||||
return
|
||||
}
|
||||
|
||||
response := DeleteUserAPIKeyResponse{
|
||||
ID: req.ID,
|
||||
}
|
||||
response := DeleteUserAPIKeyResponse(req)
|
||||
|
||||
httpserver.RenderJSON(w, http.StatusOK, response)
|
||||
}
|
||||
|
||||
@@ -19,13 +19,14 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
authsvc "go.probo.inc/probo/pkg/auth"
|
||||
"go.gearno.de/kit/httpserver"
|
||||
authsvc "go.probo.inc/probo/pkg/auth"
|
||||
"go.probo.inc/probo/pkg/mail"
|
||||
)
|
||||
|
||||
type (
|
||||
ForgetPasswordRequest struct {
|
||||
Email string `json:"email"`
|
||||
Email mail.Addr `json:"email"`
|
||||
}
|
||||
|
||||
ForgetPasswordResponse struct {
|
||||
|
||||
@@ -18,9 +18,10 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"go.gearno.de/kit/httpserver"
|
||||
"go.probo.inc/probo/pkg/authz"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
"go.gearno.de/kit/httpserver"
|
||||
"go.probo.inc/probo/pkg/mail"
|
||||
)
|
||||
|
||||
type (
|
||||
@@ -30,7 +31,7 @@ type (
|
||||
|
||||
InvitationResponse struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Email string `json:"email"`
|
||||
Email mail.Addr `json:"email"`
|
||||
FullName string `json:"fullName"`
|
||||
Role string `json:"role"`
|
||||
ExpiresAt string `json:"expiresAt"`
|
||||
|
||||
@@ -25,13 +25,14 @@ import (
|
||||
authsvc "go.probo.inc/probo/pkg/auth"
|
||||
"go.probo.inc/probo/pkg/coredata"
|
||||
"go.probo.inc/probo/pkg/gid"
|
||||
"go.probo.inc/probo/pkg/mail"
|
||||
"go.probo.inc/probo/pkg/securecookie"
|
||||
)
|
||||
|
||||
type (
|
||||
SignInRequest struct {
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
Email mail.Addr `json:"email"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
SignInResponse struct {
|
||||
@@ -40,7 +41,7 @@ type (
|
||||
|
||||
UserResponse struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Email string `json:"email"`
|
||||
Email mail.Addr `json:"email"`
|
||||
FullName string `json:"fullName"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
|
||||
@@ -22,14 +22,15 @@ import (
|
||||
|
||||
"go.gearno.de/kit/httpserver"
|
||||
authsvc "go.probo.inc/probo/pkg/auth"
|
||||
"go.probo.inc/probo/pkg/mail"
|
||||
"go.probo.inc/probo/pkg/securecookie"
|
||||
)
|
||||
|
||||
type (
|
||||
SignUpRequest struct {
|
||||
Email string `json:"email"`
|
||||
Password string `json:"password"`
|
||||
FullName string `json:"fullName"`
|
||||
Email mail.Addr `json:"email"`
|
||||
Password string `json:"password"`
|
||||
FullName string `json:"fullName"`
|
||||
}
|
||||
|
||||
SignUpResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user