Commit 534b87ec authored by Manuel's avatar Manuel

[dashboard] updated host to articonf1

parent 57e95f06
class ServerConstants {
static const String host = "https://articonf1.itec.aau.at:30401/";
}
import 'package:flutter/foundation.dart';
class HostProvider { class HostProvider {
static String _hostArticonfDebug = "https://articonf1.itec.aau.at";
static String _hostArticonfRelease = "https://articonf1.itec.aau.at"; static String _hostArticonfRelease = "https://articonf1.itec.aau.at";
static String _hostManuelDebug = "https://live.nope-api.systems:81"; static String _hostManuelRelease = "https://articonf1.itec.aau.at:30470";
static String _hostManuelRelease = "https://live.nope-api.systems:81";
static String articonfHost(int port) { static String articonfHost(int port) => "$_hostArticonfRelease:$port";
return kReleaseMode ? "$_hostArticonfRelease:$port" : "$_hostArticonfDebug:$port";
}
static String get manuelHost { static String get manuelHost => _hostManuelRelease;
return kReleaseMode ? _hostManuelRelease : _hostManuelDebug;
}
} }
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:dashboard/constants/server_constants.dart';
import 'package:dashboard/exceptions/login_exception.dart'; import 'package:dashboard/exceptions/login_exception.dart';
import 'package:dashboard/querying/host_provider.dart';
import 'package:dashboard/util/user.dart'; import 'package:dashboard/util/user.dart';
import 'package:localstorage/localstorage.dart'; import 'package:localstorage/localstorage.dart';
import 'package:logger/logger.dart'; import 'package:logger/logger.dart';
...@@ -51,7 +51,7 @@ class LoginHelper { ...@@ -51,7 +51,7 @@ class LoginHelper {
"password": password, "password": password,
}); });
String url = "${ServerConstants.host}/api/tokens"; String url = "${HostProvider.articonfHost(30401)}/api/tokens";
_logger.v("calling $url"); _logger.v("calling $url");
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment