Changeset 0.32.0 (#206)
This commit is contained in:
@@ -11,11 +11,11 @@ import (
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
|
||||
"git.gobha.me/xcaliber/chat-switchboard/crypto"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/database"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/models"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/providers"
|
||||
"git.gobha.me/xcaliber/chat-switchboard/store"
|
||||
"chat-switchboard/crypto"
|
||||
"chat-switchboard/database"
|
||||
"chat-switchboard/models"
|
||||
"chat-switchboard/providers"
|
||||
"chat-switchboard/store"
|
||||
)
|
||||
|
||||
// ── Request types ───────────────────────────
|
||||
@@ -105,7 +105,6 @@ func (h *TeamHandler) CreateTeam(c *gin.Context) {
|
||||
|
||||
team := &models.Team{
|
||||
Name: req.Name,
|
||||
Slug: slugify(req.Name),
|
||||
Description: req.Description,
|
||||
CreatedBy: adminID,
|
||||
IsActive: true,
|
||||
@@ -119,7 +118,7 @@ func (h *TeamHandler) CreateTeam(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
c.JSON(http.StatusCreated, gin.H{"id": team.ID, "name": team.Name, "slug": team.Slug})
|
||||
c.JSON(http.StatusCreated, gin.H{"id": team.ID, "name": team.Name})
|
||||
AuditLog(h.stores.Audit, c, "team.create", "team", team.ID, map[string]interface{}{"name": team.Name})
|
||||
}
|
||||
|
||||
@@ -156,7 +155,6 @@ func (h *TeamHandler) UpdateTeam(c *gin.Context) {
|
||||
fields := map[string]interface{}{}
|
||||
if req.Name != nil {
|
||||
fields["name"] = *req.Name
|
||||
fields["slug"] = slugify(*req.Name)
|
||||
}
|
||||
if req.Description != nil {
|
||||
fields["description"] = *req.Description
|
||||
|
||||
Reference in New Issue
Block a user