Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cbe83bb

Browse files
committedAug 21, 2019
Update base url endpoint
1 parent aed8a8e commit cbe83bb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎lib/src/api/api_service.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class ApiService {
66
Client client = Client();
77

88
Future<List<Profile>> getProfiles() async {
9-
final response = await client.get("$baseUrl/profile");
9+
final response = await client.get("$baseUrl/api/profile");
1010
if (response.statusCode == 200) {
1111
return profileFromJson(response.body);
1212
} else {
@@ -16,7 +16,7 @@ class ApiService {
1616

1717
Future<bool> createProfile(Profile data) async {
1818
final response = await client.post(
19-
"$baseUrl/profile",
19+
"$baseUrl/api/profile",
2020
headers: {"content-type": "application/json"},
2121
body: profileToJson(data),
2222
);
@@ -29,7 +29,7 @@ class ApiService {
2929

3030
Future<bool> updateProfile(Profile data) async {
3131
final response = await client.put(
32-
"$baseUrl/profile/${data.id}",
32+
"$baseUrl/api/profile/${data.id}",
3333
headers: {"content-type": "application/json"},
3434
body: profileToJson(data),
3535
);
@@ -42,7 +42,7 @@ class ApiService {
4242

4343
Future<bool> deleteProfile(int id) async {
4444
final response = await client.delete(
45-
"$baseUrl/profile/$id",
45+
"$baseUrl/api/profile/$id",
4646
headers: {"content-type": "application/json"},
4747
);
4848
if (response.statusCode == 200) {

0 commit comments

Comments
 (0)
Please sign in to comment.