Fix: https url

This commit is contained in:
2024-06-14 01:37:42 +03:00
parent 27da063c34
commit f5e1407281
4 changed files with 7 additions and 9 deletions

View File

@@ -10,8 +10,7 @@ Future<List<GymItem>> getItems(BuildContext context,
{String searchText = '', String categoryId = ''}) async {
final token = context.read<GymLinkProvider>().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<List<GymItem>> 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<List<GymItem>> getItemsByIds(
Future<List<GymCategory>> getCategories(BuildContext context) async {
final token = context.read<GymLinkProvider>().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',