Errores solucionados

This commit is contained in:
Juan Ferrer Toribio 2017-01-31 16:09:46 +01:00
parent 2498f8ecf2
commit 35c372d12b
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ import {module} from './module';
config.$inject = ['$translatePartialLoaderProvider', '$httpProvider'];
export function config($translatePartialLoaderProvider, $httpProvider) {
$translatePartialLoaderProvider.addPart('login');
$translatePartialLoaderProvider.addPart('auth');
$httpProvider.defaults.useXDomain = true;
delete $httpProvider.defaults.headers.common['X-Requested-With'];

View File

@ -20,7 +20,7 @@ function controller($http, $element) {
this.loading = true;
model.appId = window.location.href;
$http.post('/account', this.model).then(
$http.post('/auth', this.model).then(
(json) => this.onLoginOk(json),
(json) => this.onLoginErr(json)
);

View File

@ -14,7 +14,7 @@ function controller($translate, $translatePartialLoader) {
this.onLogoutClick = function() {
let appName = 'salix';
document.cookie = `${appName}-session=; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
window.location = `/account?api_key=${appName}`;
window.location = `/auth?api_key=${appName}`;
};
this.onChangeLanguage = function() {
let lang = $translate.use() == 'en' ? 'es' : 'en';