@@ -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