Agent par défaut

This commit is contained in:
fabien committed 2026-09-07 21:04:48 +02:00
1 parent cf10b9073b
commit f74e4d1043
24 files changed
+385 -37

No files matched your search

+19 -2
View File
@@ -7,11 +7,19 @@ import (
"trankilou.fr/lassistanoque/backend/internal/domain"
"trankilou.fr/lassistanoque/backend/internal/service/agent"
"trankilou.fr/lassistanoque/backend/internal/service/auth"
"trankilou.fr/lassistanoque/backend/internal/service/user"
)
func NewAgentGroup(prefix string, e *echo.Group, service *agent.Service, middlewares ...echo.MiddlewareFunc) *echo.Group {
func NewAgentGroup(
prefix string,
e *echo.Group,
agentService *agent.Service,
userService *user.Service,
middlewares ...echo.MiddlewareFunc) *echo.Group {
agentHandler := &AgentHandler{
agentService: service,
agentService: agentService,
userService: userService,
}
agent := e.Group(prefix, middlewares...)
@@ -26,6 +34,7 @@ func NewAgentGroup(prefix string, e *echo.Group, service *agent.Service, middlew
type AgentHandler struct {
agentService *agent.Service
userService *user.Service
}
func (h *AgentHandler) ListAgents(c *echo.Context) error {
@@ -98,3 +107,11 @@ func (h *AgentHandler) DeleteAgent(c *echo.Context) error {
}
return c.JSON(http.StatusOK, agentID)
}
type DefaulAgentRequest struct {
AgentID string `json:"AgentId"`
}
type DefaulAgentResponse struct {
NewDefaultAgentID *string `json:"newDefaultAgentId"`
OldDefaultAgentID *string `json:"oldDefaultAgentId"`
}