1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-31 02:22:32 +00:00

Basic authentication is done.(need refactor)

This commit is contained in:
Rokt33r
2015-05-27 16:42:34 +09:00
parent 3e5fe1284d
commit 092a2f3e8a
22 changed files with 932 additions and 19 deletions

15
src/services/user.js Normal file
View File

@@ -0,0 +1,15 @@
angular.module('codexen.services')
.factory('User', function ($http, apiUrl, $rootScope, $state) {
$rootScope.$on('userSignOut', function(){
$state.go('auth.signin')
})
var me = function () {
var url = apiUrl + 'auth/user'
return $http.get(url)
}
return {
me: me
}
})