frontend: prefix ownerToken with commento
This commit is contained in:
parent
be85a911aa
commit
9b021d47e4
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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,
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
global.cookieSet("ownerToken", resp.ownerToken);
|
||||
global.cookieSet("commentoOwnerToken", resp.ownerToken);
|
||||
document.location = "/dashboard";
|
||||
});
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
(function (global, document) {
|
||||
|
||||
global.logout = function() {
|
||||
global.cookieSet("ownerToken", "");
|
||||
global.cookieSet("commentoOwnerToken", "");
|
||||
document.location = "/login";
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user