diff --git a/lib/mobile_example.dart b/lib/mobile_example.dart index 6c52a2b..1430122 100644 --- a/lib/mobile_example.dart +++ b/lib/mobile_example.dart @@ -12,8 +12,7 @@ void main() { } Future getToken(String token, String clientId) async { - debugPrint(token); - var url = Uri.http('gymlink.freemyip.com:8080', 'api/auth/authorize_client'); + var url = Uri.https('gymlink.freemyip.com', 'api/auth/authorize_client'); try { var response = await http.post(url, body: {'GymKey': token, 'id': clientId}); // Just testing token diff --git a/lib/pages/detail.dart b/lib/pages/detail.dart index 9f1032e..3f84b1a 100644 --- a/lib/pages/detail.dart +++ b/lib/pages/detail.dart @@ -53,7 +53,7 @@ class _DetailPageState extends State { Future _getItem() async { final Uri url = - Uri.http('gymlink.freemyip.com:8080', 'api/product/get/${widget.id}'); + Uri.https('gymlink.freemyip.com', 'api/product/get/${widget.id}'); final response = await http.get(url, headers: { 'Authorization': 'Bearer ${context.read().token}', }); diff --git a/lib/tools/items.dart b/lib/tools/items.dart index 9a21da1..bb1eb4f 100644 --- a/lib/tools/items.dart +++ b/lib/tools/items.dart @@ -10,8 +10,7 @@ Future> getItems(BuildContext context, {String searchText = '', String categoryId = ''}) async { final token = context.read().token; if (token != '') { - final Uri url = - Uri.http('gymlink.freemyip.com:8080', 'api/product/get-list'); + final Uri url = Uri.https('gymlink.freemyip.com', 'api/product/get-list'); try { final response = await http.post(url, headers: { @@ -48,7 +47,7 @@ Future> getItemsByIds( return []; } final Uri url = - Uri.http('gymlink.freemyip.com:8080', 'api/product/get-products'); + Uri.https('gymlink.freemyip.com', 'api/product/get-products'); try { final response = await http.post(url, headers: { @@ -76,8 +75,8 @@ Future> getItemsByIds( Future> getCategories(BuildContext context) async { final token = context.read().token; if (token != '') { - final Uri url = Uri.http( - 'gymlink.freemyip.com:8080', 'api/category/get-internal-categories'); + final Uri url = Uri.https( + 'gymlink.freemyip.com', 'api/category/get-internal-categories'); try { final response = await http.get(url, headers: { 'Authorization': 'Bearer $token', diff --git a/web/js/demo-js-interop.js b/web/js/demo-js-interop.js index bfb7cae..6b2af60 100644 --- a/web/js/demo-js-interop.js +++ b/web/js/demo-js-interop.js @@ -8,7 +8,7 @@ let appState = window._appState; function getToken(token) { - fetch('http://gymlink.freemyip.com:8080/api/auth/authorize_client', { + fetch('https://gymlink.freemyip.com/api/auth/authorize_client', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({