✨ Fix listing destinations api
This commit is contained in:
parent
9f0bce81ce
commit
3eee9755d4
@ -11,8 +11,7 @@ func listDestination(c *fiber.Ctx) error {
|
|||||||
var destinations []models.BaseDestination
|
var destinations []models.BaseDestination
|
||||||
for _, value := range services.DestinationsByIndex {
|
for _, value := range services.DestinationsByIndex {
|
||||||
var parsed models.BaseDestination
|
var parsed models.BaseDestination
|
||||||
raw, _ := jsoniter.Marshal(value)
|
_ = jsoniter.Unmarshal(value.Raw, &parsed)
|
||||||
_ = jsoniter.Unmarshal(raw, &parsed)
|
|
||||||
destinations = append(destinations, parsed)
|
destinations = append(destinations, parsed)
|
||||||
}
|
}
|
||||||
return c.JSON(destinations)
|
return c.JSON(destinations)
|
||||||
|
Loading…
Reference in New Issue
Block a user