Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcbe83bb

Browse files
committed
Update base url endpoint
1 parentaed8a8e commitcbe83bb

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
returnprofileFromJson(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)

[8]ページ先頭

©2009-2025 Movatter.jp