mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
Upgrading STF for security reasons (#813)
* Upgrading STF for security reasons Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * update semaphore files Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * upgrading STF for security reasons v2 Signed-off-by: Denis barbaron <denis.barbaron@orange.com> * update yarn.lock file Signed-off-by: Denis barbaron <denis.barbaron@orange.com> --------- Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* Copyright © 2019 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
* Copyright © 2019-2024 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
|
||||
**/
|
||||
|
||||
module.exports = function SignInCtrl($scope, $http, CommonService) {
|
||||
module.exports = function SignInCtrl($window, $scope, $http, CommonService) {
|
||||
|
||||
$window.angular.version = {}
|
||||
|
||||
$scope.error = null
|
||||
|
||||
@@ -13,12 +15,12 @@ module.exports = function SignInCtrl($scope, $http, CommonService) {
|
||||
}
|
||||
$scope.invalid = false
|
||||
$http.post('/auth/api/v1/mock', data)
|
||||
.success(function(response) {
|
||||
.then(function(response) {
|
||||
$scope.error = null
|
||||
location.replace(response.redirect)
|
||||
location.replace(response.data.redirect)
|
||||
})
|
||||
.error(function(response) {
|
||||
switch (response.error) {
|
||||
.catch(function(response) {
|
||||
switch (response.data.error) {
|
||||
case 'ValidationError':
|
||||
$scope.error = {
|
||||
$invalid: true
|
||||
|
||||
Reference in New Issue
Block a user