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:
15
src/services/user.js
Normal file
15
src/services/user.js
Normal 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
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user