up
This commit is contained in:
@@ -52,6 +52,10 @@ func CreatePortalUsuario(c *fiber.Ctx) error {
|
||||
Notas string `json:"notas"`
|
||||
TelegramChatID string `json:"telegram_chat_id"`
|
||||
SitioWeb string `json:"sitio_web"`
|
||||
Telefono string `json:"telefono"`
|
||||
Indicativo string `json:"indicativo"`
|
||||
Pais string `json:"pais"`
|
||||
Ciudad string `json:"ciudad"`
|
||||
}
|
||||
var req Req
|
||||
if err := c.BodyParser(&req); err != nil {
|
||||
@@ -88,6 +92,10 @@ func CreatePortalUsuario(c *fiber.Ctx) error {
|
||||
Notas: req.Notas,
|
||||
TelegramChatID: req.TelegramChatID,
|
||||
SitioWeb: req.SitioWeb,
|
||||
Telefono: req.Telefono,
|
||||
Indicativo: req.Indicativo,
|
||||
Pais: req.Pais,
|
||||
Ciudad: req.Ciudad,
|
||||
}
|
||||
if err := models.CreatePortalUser(u); err != nil {
|
||||
return c.Status(500).JSON(fiber.Map{"error": err.Error()})
|
||||
@@ -112,6 +120,10 @@ func UpdatePortalUsuario(c *fiber.Ctx) error {
|
||||
Notas string `json:"notas"`
|
||||
TelegramChatID string `json:"telegram_chat_id"`
|
||||
SitioWeb string `json:"sitio_web"`
|
||||
Telefono string `json:"telefono"`
|
||||
Indicativo string `json:"indicativo"`
|
||||
Pais string `json:"pais"`
|
||||
Ciudad string `json:"ciudad"`
|
||||
}
|
||||
var req Req
|
||||
if err := c.BodyParser(&req); err != nil {
|
||||
@@ -137,6 +149,10 @@ func UpdatePortalUsuario(c *fiber.Ctx) error {
|
||||
Notas: req.Notas,
|
||||
TelegramChatID: req.TelegramChatID,
|
||||
SitioWeb: req.SitioWeb,
|
||||
Telefono: req.Telefono,
|
||||
Indicativo: req.Indicativo,
|
||||
Pais: req.Pais,
|
||||
Ciudad: req.Ciudad,
|
||||
}
|
||||
u.ID = uint(id)
|
||||
if err := models.UpdatePortalUser(u); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user