'use strict';

var backendRequestAuth = require('./backend').backendRequestAuth;

exports.resetApp = resetApp;
exports.post = post;

function resetApp(profile, callback) {
    backendRequestAuth({
        uri: '/prepopulate',
        method: 'POST',
        json: {'profile': profile}
    }, function(e, r, j) {
        browser.params.token = null;
        callback(e, r, j);
    });
}

function post(params, callback) {
    params.method = 'POST';
    backendRequestAuth(params, callback);
}

@@ -8,16 +8,74 @@
 rict';%0A%0A
+var backendRequest = require('./backend').backendRequest;%0A
 var back
@@ -133,16 +133,37 @@
 tAuth;%0A%0A
+exports.post = post;%0A
 exports.
@@ -182,37 +182,16 @@
 esetApp;
-%0Aexports.post = post;
 %0A%0Afuncti
@@ -241,20 +241,16 @@
 dRequest
-Auth
 (%7B%0A     

reset app without auth