Fix sub-url handling

Previously the app was unable to work with instances installed on sub-urls
because sub-url path was removed (say, server.name/api/v2/login instead of
server.name/wger/api/v2/login).
This commit is contained in:
Daniil Kovalev
2022-06-25 15:52:43 +03:00
parent 31b9f93be7
commit ad810026e8

View File

@@ -26,7 +26,7 @@ Uri makeUri(
]) {
final Uri uriServer = Uri.parse(serverUrl);
final pathList = ['api', 'v2', path];
final pathList = [uriServer.path, 'api', 'v2', path];
if (id != null) {
pathList.add(id.toString());
}