diff --git a/README.md b/README.md index 55ce868..fb2b923 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,10 @@ - `GET /api/nodes/{id}/access` - `PUT /api/nodes/{id}/access` - `POST /api/nodes/{id}/public-links` -- `GET /public/{token}` -- `GET /public/{token}/download` +- `GET /public/{token}` внутри сервиса +- `GET /public/{token}/download` внутри сервиса +- `GET /api/files/public/{token}` через Portal proxy +- `GET /api/files/public/{token}/download` через Portal proxy ## Миграционный путь @@ -31,4 +33,3 @@ 2. Сделать новый UI `Файлы`: `Мои файлы` и `Доступные мне`. 3. Перенести старые `office_documents` и `google_sheets` в `files_nodes`. 4. После проверки выключить старые `/api/office` и `/api/sheets`. - diff --git a/internal/handler/node.go b/internal/handler/node.go index f7a148c..5cd2c7c 100644 --- a/internal/handler/node.go +++ b/internal/handler/node.go @@ -237,7 +237,7 @@ func (h *NodeHandler) CreatePublicLink(w http.ResponseWriter, r *http.Request) { h.repo.Audit(r.Context(), userID, "files.public_link_create", "files_node", id, "{}") writeJSON(w, http.StatusCreated, model.PublicLinkResponse{ ID: linkID, - URL: strings.TrimRight(h.cfg.PublicBaseURL, "/") + "/public/files/" + token, + URL: strings.TrimRight(h.cfg.PublicBaseURL, "/") + "/api/files/public/" + token, ExpiresAt: req.ExpiresAt, }) }