account.factory.js 374 B

123456789101112131415161718
  1. (function() {
  2. 'use strict';
  3. app.factory('account.repository', function(webApi, $http) {
  4. return {
  5. login: _login,
  6. registration: _registration
  7. };
  8. function _registration(data) {
  9. return $http.post(webApi.DOMAIN + '/api/v1/account/register', data);
  10. }
  11. function _login(data) {
  12. return $http.post(webApi.DOMAIN + '/api/v1/account/login', data);
  13. }
  14. })
  15. })()