Skip to content

Commit

Permalink
set xml content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
idprm committed Oct 2, 2024
1 parent 367d085 commit fe01446
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion internal/domain/entity/news.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ func (e *News) GetId() int64 {

func (e *News) GetTitle() string {
replacer := strings.NewReplacer(
"é", "e",
`"`, "",
)
return replacer.Replace(e.Title)
Expand Down
12 changes: 6 additions & 6 deletions internal/handler/incoming_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ func (h *IncomingHandler) MessageOriginated(c *fiber.Ctx) error {
}

func (h *IncomingHandler) Main(c *fiber.Ctx) error {
c.Set("Content-type", "application/xml; charset=utf-8")
c.Set("Content-type", "text/xml; charset=iso-8859-1")
menu, err := h.menuService.GetBySlug("home")
if err != nil {
return c.Status(fiber.StatusBadGateway).SendString(err.Error())
Expand All @@ -224,7 +224,7 @@ func (h *IncomingHandler) Main(c *fiber.Ctx) error {
}

func (h *IncomingHandler) Menu(c *fiber.Ctx) error {
c.Set("Content-type", "application/xml; charset=utf-8")
c.Set("Content-type", "text/xml; charset=iso-8859-1")
req := new(model.UssdRequest)

err := c.QueryParser(req)
Expand Down Expand Up @@ -440,7 +440,7 @@ func (h *IncomingHandler) Menu(c *fiber.Ctx) error {
}

func (h *IncomingHandler) Detail(c *fiber.Ctx) error {
c.Set("Content-type", "application/xml; charset=utf-8")
c.Set("Content-type", "text/xml; charset=iso-8859-1")
req := new(model.UssdRequest)

err := c.QueryParser(req)
Expand All @@ -467,7 +467,7 @@ func (h *IncomingHandler) Detail(c *fiber.Ctx) error {
}

func (h *IncomingHandler) Select(c *fiber.Ctx) error {
c.Set("Content-type", "application/xml; charset=utf-8")
c.Set("Content-type", "text/xml; charset=iso-8859-1")
req := new(model.UssdRequest)

err := c.QueryParser(req)
Expand Down Expand Up @@ -522,7 +522,7 @@ func (h *IncomingHandler) Select(c *fiber.Ctx) error {
}

func (h *IncomingHandler) Pagination(c *fiber.Ctx) error {
c.Set("Content-type", "application/xml; charset=utf-8")
c.Set("Content-type", "text/xml; charset=iso-8859-1")
req := new(model.UssdRequest)

err := c.QueryParser(req)
Expand Down Expand Up @@ -577,7 +577,7 @@ func (h *IncomingHandler) Pagination(c *fiber.Ctx) error {
}

func (h *IncomingHandler) Buy(c *fiber.Ctx) error {
c.Set("Content-type", "application/xml; charset=utf-8")
c.Set("Content-type", "text/xml; charset=iso-8859-1")
req := new(model.UssdRequest)

err := c.QueryParser(req)
Expand Down

0 comments on commit fe01446

Please sign in to comment.