Commit b162112e authored by Antek Grzanka's avatar Antek Grzanka

Task description showing. Fixed auth redirect.

parent fe57d070
(function(){
angular.module('ctfApp').controller('LoginController',
['$scope', '$rootScope', '$location', 'AuthenticationService', '$window', 'NavbarService',
function ($scope, $rootScope, $location, AuthenticationService, $window, NavbarService) {
['$scope', '$rootScope', '$location', 'AuthenticationService', '$window', 'NavbarService', 'AppSettings',
function ($scope, $rootScope, $location, AuthenticationService, $window, NavbarService, AppSettings) {
// reset login status
AuthenticationService.clearCredentials();
......@@ -13,7 +13,7 @@
$location.path('/');
AuthenticationService.setCredentials($scope.username, $scope.password, response.team);
// redirect to additional external auth point
$window.location.href = "http://"+$scope.username+":"+$scope.password+"@52.28.244.24:8080/api/v1/auth";
$window.location.href = AppSettings.getApiAddressWithCredentials($scope.username, $scope.password) + '/auth';
} else {
Materialize.toast('Błąd logowania! Spróbuj jeszcze raz.', 5000 ,'toast-error');
$scope.dataLoading = false;
......
......@@ -39,8 +39,8 @@
app.factory('AppSettings', ['$http', function($http) {
// fallback into defaults, if everything fails, world collapses and /startup will not resolve
var domainName = '52.28.244.24', port = "http", schema = 8080;
// fallback into defaults, if everything fails, world collapses, hell freezes and /startup will not resolve
var domainName = '52.25.28.64', port = "http", schema = 8080;
return {
......
......@@ -18,11 +18,7 @@
</div>
</span>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
{{task.description}}
</p>
</div>
</div>
......
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