Feature: get user's accounts

This commit is contained in:
2015-10-01 09:09:48 +00:00
parent 8ed20ebf78
commit fdedcdcdff
17 changed files with 476 additions and 82 deletions

View File

@@ -1,21 +1,27 @@
(function() {
'use strict';
var HOST = 'http://cloudbudget.pavnay.fr/api';
var HOST = 'http://cloudbudget-febbweiss.c9.io/api';
angular
.module('cloudbudget', ['ngRoute', 'routes', 'ngCookies'])
.module('cloudbudget', ['ngRoute', 'routes', 'ngCookies', 'xeditable'])
.constant('apiRoutes', {
'host': HOST,
'port': "80",
'login': HOST + '/users/login',
'register': HOST + '/users',
'unregister': HOST + '/users/'
'host' : HOST,
'port' : "80",
'login' : HOST + '/users/login',
'register' : HOST + '/users',
'unregister' : HOST + '/users/',
'accounts' : HOST + '/accounts/'
})
.run(run);
run.$inject = ['$rootScope', '$location', '$cookieStore', '$http', '$filter'];
function run( $rootScope, $location, $cookieStore, $http, $filter) {
run.$inject = ['$rootScope', '$location', '$cookieStore', '$http', '$filter', 'editableThemes', 'editableOptions'];
function run( $rootScope, $location, $cookieStore, $http, $filter, editableThemes, editableOptions) {
editableThemes.bs3.inputClass = 'input-sm';
editableThemes.bs3.buttonsClass = 'btn-sm';
editableOptions.theme = 'bs3';
$rootScope.globals = $cookieStore.get('globals') || {};
if( $rootScope.globals.user && $rootScope.globals.user.token) {
$http.defaults.headers.common['Authorization'] = 'JWT ' + $rootScope.globals.user.token;