mirror of
https://github.com/kovetskiy/mark.git
synced 2026-03-17 07:57:37 +08:00
NewAPI: normalize baseURL by trimming the trailing slash before building rest and json-rpc endpoints. Previously the TrimSuffix only applied to api.BaseURL but rest/json URLs were already constructed with the raw (potentially trailing-slash) baseURL, producing double slashes like 'http://example.com//rest/api'. DeletePageLabel: add a non-200/non-204 status check before the type assertion. Without this guard any error response (400, 403, 500) would fall through to request.Response.(*LabelInfo) and either panic or return garbage data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>