Fix lecture de document avec caractères spéciaux dans le titre
This commit is contained in:
parent
b2c3d4636e
commit
8bb61616ba
1 changed files with 7 additions and 1 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"sort"
|
||||
|
||||
"git.agecem.com/agecem/agecem-org/api"
|
||||
|
@ -98,7 +99,12 @@ func (h *WebHandler) HandlePublicDocumentation(c echo.Context) error {
|
|||
bucket := c.Param("bucket")
|
||||
document := c.Param("document")
|
||||
|
||||
response, err := h.ApiClient.Voki.Call(http.MethodGet, fmt.Sprintf("/v1/bucket/%s/%s", bucket, document), nil, true)
|
||||
unescaped, err := url.QueryUnescape(fmt.Sprintf("/v1/bucket/%s/%s", bucket, document))
|
||||
if err != nil {
|
||||
return c.JSON(http.StatusBadRequest, map[string]string{"message": "Bad Request"})
|
||||
}
|
||||
|
||||
response, err := h.ApiClient.Voki.Call(http.MethodGet, unescaped, nil, true)
|
||||
if err != nil {
|
||||
return c.JSON(models.NotFoundResponse())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue