@@ -6,7 +6,7 @@ class ApiService {
6
6
Client client = Client ();
7
7
8
8
Future <List <Profile >> getProfiles () async {
9
- final response = await client.get ("$baseUrl /profile" );
9
+ final response = await client.get ("$baseUrl /api/ profile" );
10
10
if (response.statusCode == 200 ) {
11
11
return profileFromJson (response.body);
12
12
} else {
@@ -16,7 +16,7 @@ class ApiService {
16
16
17
17
Future <bool > createProfile (Profile data) async {
18
18
final response = await client.post (
19
- "$baseUrl /profile" ,
19
+ "$baseUrl /api/ profile" ,
20
20
headers: {"content-type" : "application/json" },
21
21
body: profileToJson (data),
22
22
);
@@ -29,7 +29,7 @@ class ApiService {
29
29
30
30
Future <bool > updateProfile (Profile data) async {
31
31
final response = await client.put (
32
- "$baseUrl /profile/${data .id }" ,
32
+ "$baseUrl /api/ profile/${data .id }" ,
33
33
headers: {"content-type" : "application/json" },
34
34
body: profileToJson (data),
35
35
);
@@ -42,7 +42,7 @@ class ApiService {
42
42
43
43
Future <bool > deleteProfile (int id) async {
44
44
final response = await client.delete (
45
- "$baseUrl /profile/$id " ,
45
+ "$baseUrl /api/ profile/$id " ,
46
46
headers: {"content-type" : "application/json" },
47
47
);
48
48
if (response.statusCode == 200 ) {
0 commit comments