frontend: prefix ownerToken with commento

This commit is contained in:
Adhityaa 2018-06-20 09:06:49 +05:30
parent be85a911aa
commit 9b021d47e4
7 changed files with 11 additions and 11 deletions

View File

@ -36,7 +36,7 @@
// Creates a new domain.
global.domainNewHandler = function() {
var json = {
"ownerToken": global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
"name": $("#new-domain-name").val(),
"domain": $("#new-domain-domain").val(),
}
@ -66,7 +66,7 @@
// Refreshes the list of domains.
global.domainRefresh = function(callback) {
var json = {
ownerToken: global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
};
global.post(global.commentoOrigin + "/api/domain/list", json, function(resp) {
@ -107,7 +107,7 @@
// Updates a domain with the backend.
global.domainUpdate = function(domain, callback) {
var json = {
"ownerToken": global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
"domain": domain,
};
@ -126,7 +126,7 @@
// Deletes a domain.
global.domainDelete = function(domain, callback) {
var json = {
"ownerToken": global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
"domain": domain,
};

View File

@ -12,7 +12,7 @@
var data = global.dashboard.$data;
var json = {
"ownerToken": global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
"domain": data.domains[data.cd].domain,
"url": url,
}

View File

@ -13,7 +13,7 @@
var email = $("#new-mod").val();
var json = {
"ownerToken": global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
"domain": data.domains[data.cd].domain,
"email": email,
}
@ -53,7 +53,7 @@
var data = global.dashboard.$data;
var json = {
"ownerToken": global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
"domain": data.domains[data.cd].domain,
"email": email,
}

View File

@ -38,7 +38,7 @@
var data = global.dashboard.$data;
var json = {
"ownerToken": global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
"domain": data.domains[data.cd].domain,
}

View File

@ -65,7 +65,7 @@
return;
}
global.cookieSet("ownerToken", resp.ownerToken);
global.cookieSet("commentoOwnerToken", resp.ownerToken);
document.location = "/dashboard";
});
};

View File

@ -1,7 +1,7 @@
(function (global, document) {
global.logout = function() {
global.cookieSet("ownerToken", "");
global.cookieSet("commentoOwnerToken", "");
document.location = "/login";
}

View File

@ -3,7 +3,7 @@
// Get self details.
global.selfGet = function(callback) {
var json = {
"ownerToken": global.cookieGet("ownerToken"),
"ownerToken": global.cookieGet("commentoOwnerToken"),
};
global.post(global.commentoOrigin + "/api/owner/self", json, function(resp) {