Revert "Build post chat and attachment workflows"

This reverts commit 0b920da187.
This commit is contained in:
Cauê Faleiros
2026-06-09 15:57:45 -03:00
parent 0b920da187
commit 5bc4a551af
30 changed files with 204 additions and 3021 deletions

View File

@@ -25,8 +25,6 @@ type Invitation struct {
CreatedBy *string `json:"created_by"`
CreatedAt time.Time `json:"created_at"`
InvitationURL string `json:"invitation_url,omitempty"`
EmailSent bool `json:"email_sent"`
EmailError string `json:"email_error,omitempty"`
}
type CreateInvitationInput struct {

View File

@@ -5,22 +5,18 @@ import (
"strings"
"time"
"mira/backend/internal/mail"
"github.com/gin-gonic/gin"
)
type Routes struct {
store Store
appPublicURL string
mailSender mail.Sender
}
func NewRoutes(store Store, appPublicURL string, mailSender mail.Sender) Routes {
func NewRoutes(store Store, appPublicURL string) Routes {
return Routes{
store: store,
appPublicURL: strings.TrimRight(appPublicURL, "/"),
mailSender: mailSender,
}
}
@@ -110,14 +106,6 @@ func (r Routes) createInvitation(c *gin.Context) {
}
invitation.InvitationURL = r.invitationURL(token)
invitation.EmailSent = false
if r.mailSender.IsConfigured() {
if err := r.mailSender.SendInvitation(invitation.Email, invitation.InvitationURL); err != nil {
invitation.EmailError = "Convite criado, mas nao foi possivel enviar o e-mail."
} else {
invitation.EmailSent = true
}
}
c.JSON(http.StatusCreated, gin.H{"invitation": invitation})
}