mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 08:21:39 -06:00
fix(settings): display complete endpoint path in koreader sync url
The KOReader settings page displayed the origin-only base URL without the /api/v1/koreader path suffix, causing manual URL copy and built-in progress sync setup to fail due to incomplete endpoint paths. Updates the UI to display the full KOReader sync URL with the API endpoint path included, consolidates redundant copy fields, and updates plugin URL normalization to handle full stock sync URLs seamlessly. Closes #981
This commit is contained in:
@@ -108,6 +108,11 @@ local function assertEqual(actual, expected, label)
|
||||
end
|
||||
end
|
||||
|
||||
assertEqual(BookOrbitApi.normalizeServerUrl("https://bookorbit.example.com"),
|
||||
"https://bookorbit.example.com/api/v1", "origin-only server URL is normalized")
|
||||
assertEqual(BookOrbitApi.normalizeServerUrl("https://bookorbit.example.com/api/v1/koreader"),
|
||||
"https://bookorbit.example.com/api/v1", "stock sync URL is normalized")
|
||||
|
||||
local decoded, err = BookOrbitApi.decodeResponse({ "" })
|
||||
assertEqual(type(decoded), "table", "empty body decodes to table")
|
||||
assertEqual(err, nil, "empty body has no error")
|
||||
|
||||
Reference in New Issue
Block a user