Skip to content
Snippets Groups Projects
Commit 4f68b2b0 authored by wonbin's avatar wonbin
Browse files

Bachend_Integration

parent 053771bf
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ class MyAppState extends ChangeNotifier { ...@@ -59,7 +59,7 @@ class MyAppState extends ChangeNotifier {
Future<List<WordPair>> fetchFavorites() async { Future<List<WordPair>> fetchFavorites() async {
final response=await http.get( final response=await http.get(
Uri.parse('https://wonbin3977.web.ajousw.kr/likes')); Uri.parse('http://localhost:3000/likes'));
List<WordPair> list = []; List<WordPair> list = [];
var jsonData = jsonDecode(response.body); var jsonData = jsonDecode(response.body);
...@@ -73,7 +73,7 @@ class MyAppState extends ChangeNotifier { ...@@ -73,7 +73,7 @@ class MyAppState extends ChangeNotifier {
} }
Future<void> toggleFavorite() async { Future<void> toggleFavorite() async {
var uri ="https:wonbin3977.web.ajousw.kr/likes/${current.first}_${current.second}"; var uri ="http://localhost:3000/likes/${current.first}_${current.second}";
if(favorites.contains(current)) { if(favorites.contains(current)) {
final http.Response resp=await http.delete(Uri.parse(uri)); final http.Response resp=await http.delete(Uri.parse(uri));
if(resp.statusCode!=200) { if(resp.statusCode!=200) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment