mirror of
https://github.com/chenasraf/pantry-flutter.git
synced 2026-05-17 17:28:03 +00:00
fix: preserve subpath for Nextcloud instances hosted on sub-paths
This commit is contained in:
@@ -34,8 +34,11 @@ class ApiClient {
|
||||
|
||||
Uri _uri(String path, [Map<String, String>? queryParameters]) {
|
||||
final base = Uri.parse(_credentials.serverUrl);
|
||||
final prefix = base.path.endsWith('/')
|
||||
? base.path.substring(0, base.path.length - 1)
|
||||
: base.path;
|
||||
return base.replace(
|
||||
path: '$basePath$path',
|
||||
path: '$prefix$basePath$path',
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user