mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-22 16:20:44 +01:00
121567fa03
- Update dependencies - Remove lib/ - Dashboard
27 lines
752 B
JavaScript
27 lines
752 B
JavaScript
app.config(function ($stateProvider, $urlRouterProvider, $locationProvider, $couchPotatoProvider) {
|
|
$stateProvider.state('auth', {
|
|
url: '/auth',
|
|
abstract: true,
|
|
templateUrl: '/tpl/abstract.html'
|
|
})
|
|
.state('auth.login', {
|
|
url: '/login',
|
|
pageTitle: "Sign In",
|
|
templateUrl: '/tpl/auth/login.html',
|
|
controller: "SignInCtrl",
|
|
resolve: {
|
|
$d: $couchPotatoProvider.resolveDependencies(['controllers/auth/login'])
|
|
}
|
|
})
|
|
.state('auth.logout', {
|
|
url: '/logout',
|
|
public: true,
|
|
templateUrl: '/tpl/auth/logout.html',
|
|
controller: ['$http', '$rootScope', '$state', function ($http, $rootScope, $state) {
|
|
$http.post('/auth/logout').success(function () {
|
|
$rootScope.refreshUser();
|
|
$state.go('auth.login');
|
|
});
|
|
}]
|
|
});
|
|
}); |