1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-19 11:43:30 +01:00

fix(gitlab): encode path

This commit is contained in:
Rongjian Zhang 2019-12-12 00:06:42 +08:00
parent d91ae0a213
commit a8faf76227

View File

@ -19,8 +19,9 @@ class GitlabBlobScreen extends StatelessWidget {
return RefreshStatefulScaffold<GitlabBlob>(
title: AppBarTitle(path),
fetchData: () async {
final encodedPath = Uri.encodeComponent(path);
final res = await Provider.of<AuthModel>(context).fetchGitlab(
'/projects/$id/repository/files/$path?ref=master'); // TODO:
'/projects/$id/repository/files/$encodedPath?ref=master'); // TODO:
return GitlabBlob.fromJson(res);
},
bodyBuilder: (data, _) {