Skip to content

Commit 26c2328

Browse files
committed
Fixed a bug in the Avatars service where location URL generation had syntax error
1 parent 988ac08 commit 26c2328

File tree

3 files changed

+18
-17
lines changed

3 files changed

+18
-17
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## 0.2.2
22

33
- Fixed an error that happend when the OAuth session creation request was sent before any other API call
4-
-
4+
- Fixed a bug in the Avatars service where location URL generation had syntax error
5+
56
## 0.2.1
67

78
- Fixed callback scheme

lib/services/avatars.dart

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ class Avatars extends Service {
5151
};
5252

5353
Uri endpoint = Uri.parse(client.endPoint);
54-
Uri url = new Uri(scheme: endpoint.scheme,
54+
Uri location = new Uri(scheme: endpoint.scheme,
5555
host: endpoint.host,
5656
port: endpoint.port,
5757
path: endpoint.path + path,
5858
queryParameters:params,
5959
);
6060

61-
return url.toString();
61+
return location.toString();
6262
}
6363

6464
/// Get Favicon
@@ -75,14 +75,14 @@ class Avatars extends Service {
7575
};
7676

7777
Uri endpoint = Uri.parse(client.endPoint);
78-
Uri url = new Uri(scheme: endpoint.scheme,
78+
Uri location = new Uri(scheme: endpoint.scheme,
7979
host: endpoint.host,
8080
port: endpoint.port,
8181
path: endpoint.path + path,
8282
queryParameters:params,
8383
);
8484

85-
return url.toString();
85+
return location.toString();
8686
}
8787

8888
/// Get Country Flag
@@ -102,14 +102,14 @@ class Avatars extends Service {
102102
};
103103

104104
Uri endpoint = Uri.parse(client.endPoint);
105-
Uri url = new Uri(scheme: endpoint.scheme,
105+
Uri location = new Uri(scheme: endpoint.scheme,
106106
host: endpoint.host,
107107
port: endpoint.port,
108108
path: endpoint.path + path,
109109
queryParameters:params,
110110
);
111111

112-
return url.toString();
112+
return location.toString();
113113
}
114114

115115
/// Get Image from URL
@@ -130,14 +130,14 @@ class Avatars extends Service {
130130
};
131131

132132
Uri endpoint = Uri.parse(client.endPoint);
133-
Uri url = new Uri(scheme: endpoint.scheme,
133+
Uri location = new Uri(scheme: endpoint.scheme,
134134
host: endpoint.host,
135135
port: endpoint.port,
136136
path: endpoint.path + path,
137137
queryParameters:params,
138138
);
139139

140-
return url.toString();
140+
return location.toString();
141141
}
142142

143143
/// Get QR Code
@@ -157,13 +157,13 @@ class Avatars extends Service {
157157
};
158158

159159
Uri endpoint = Uri.parse(client.endPoint);
160-
Uri url = new Uri(scheme: endpoint.scheme,
160+
Uri location = new Uri(scheme: endpoint.scheme,
161161
host: endpoint.host,
162162
port: endpoint.port,
163163
path: endpoint.path + path,
164164
queryParameters:params,
165165
);
166166

167-
return url.toString();
167+
return location.toString();
168168
}
169169
}

lib/services/storage.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ class Storage extends Service {
125125
};
126126

127127
Uri endpoint = Uri.parse(client.endPoint);
128-
Uri url = new Uri(scheme: endpoint.scheme,
128+
Uri location = new Uri(scheme: endpoint.scheme,
129129
host: endpoint.host,
130130
port: endpoint.port,
131131
path: endpoint.path + path,
132132
queryParameters:params,
133133
);
134134

135-
return url.toString();
135+
return location.toString();
136136
}
137137

138138
/// Get File Preview
@@ -155,14 +155,14 @@ class Storage extends Service {
155155
};
156156

157157
Uri endpoint = Uri.parse(client.endPoint);
158-
Uri url = new Uri(scheme: endpoint.scheme,
158+
Uri location = new Uri(scheme: endpoint.scheme,
159159
host: endpoint.host,
160160
port: endpoint.port,
161161
path: endpoint.path + path,
162162
queryParameters:params,
163163
);
164164

165-
return url.toString();
165+
return location.toString();
166166
}
167167

168168
/// Get File for View
@@ -179,13 +179,13 @@ class Storage extends Service {
179179
};
180180

181181
Uri endpoint = Uri.parse(client.endPoint);
182-
Uri url = new Uri(scheme: endpoint.scheme,
182+
Uri location = new Uri(scheme: endpoint.scheme,
183183
host: endpoint.host,
184184
port: endpoint.port,
185185
path: endpoint.path + path,
186186
queryParameters:params,
187187
);
188188

189-
return url.toString();
189+
return location.toString();
190190
}
191191
}

0 commit comments

Comments
 (0)