~sidi/study.cs.ucl-password-collection-clients/chromium-browser-svn-imports

« back to all changes in this revision

Viewing changes to js/DataUploadService.js

  • Committer: n.vorkinn
  • Date: 2015-04-13 14:20:37 UTC
  • Revision ID: svn-v4:3bbfed7f-bd00-4028-93a3-b2b0390bd3ad::79
Adding server root URL constant

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
angular.module('PasswordMonitor').factory('DataUploadService', function ($q, $http, IdbService) {
 
1
var app = angular.module('PasswordMonitor');
 
2
app.constant('serverRootUrl', 'https://study.cs.ucl.ac.uk/multitasking/web/app_dev.php/');
 
3
app.factory('DataUploadService', function ($q, $http, IdbService, serverRootUrl) {
2
4
 
3
5
    function getEmail() {
4
6
        var deferred = $q.defer();
23
25
                    tables = retrievedTables;
24
26
                    port.postMessage({inProgress: true, stage: 2, text: 'Getting login status'});
25
27
                    return $q.all([
26
 
                        $http.get('https://study.cs.ucl.ac.uk/multitasking/web/app_dev.php/a/login'),
 
28
                        $http.get(serverRootUrl + 'a/login'),
27
29
                        getEmail()
28
30
                    ]);
29
31
                }).then(function (result) {