update
This commit is contained in:
@ -4,13 +4,16 @@ import 'package:flutter_polyline_points/flutter_polyline_points.dart';
|
||||
//import 'package:google_maps_webservice/directions.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '../utils/const.dart';
|
||||
|
||||
|
||||
class DestinationService{
|
||||
|
||||
static Future<List<dynamic>> getDestinations(int user_id) async {
|
||||
List<dynamic> cats = [];
|
||||
//String url = "http://container.intranet.sumasen.net:8100/api/destinations/?user_id=${user_id}";
|
||||
String url = "http://localhost:8100/api/destinations/?user_id=${user_id}";
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = "${server_url}/api/destinations/?user_id=${user_id}";
|
||||
//String url = "http://localhost:8100/api/destinations/?user_id=${user_id}";
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -26,8 +29,9 @@ class DestinationService{
|
||||
|
||||
static Future<Map<String, dynamic>> deleteDestination(int dest_id) async {
|
||||
Map<String, dynamic> cats = {};
|
||||
//String url = "http://container.intranet.sumasen.net:8100/api/delete_destination/?dest_id=${dest_id}";
|
||||
String url = "http://localhost:8100/api/delete_destination/?dest_id=${dest_id}";
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = "${server_url}/api/delete_destination/?dest_id=${dest_id}";
|
||||
//String url = "http://localhost:8100/api/delete_destination/?dest_id=${dest_id}";
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
@ -44,8 +48,9 @@ class DestinationService{
|
||||
|
||||
static Future<int> updateOrder(int action_id, int order, String dir) async {
|
||||
int cats = 0;
|
||||
//String url = "http://container.intranet.sumasen.net:8100/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
|
||||
String url = "http://localhost:8100/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
|
||||
String server_url = ConstValues.currentServer();
|
||||
String url = "${server_url}/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
|
||||
//String url = "http://localhost:8100/api/updateorder/?user_action_id=${action_id}&order=${order}&dir=${dir}";
|
||||
final http.Response response = await http.get(
|
||||
Uri.parse(url),
|
||||
headers: <String, String>{
|
||||
|
||||
Reference in New Issue
Block a user