frontend: prefix ownerToken with commento
This commit is contained in:
parent
be85a911aa
commit
9b021d47e4
@ -36,7 +36,7 @@
|
|||||||
// Creates a new domain.
|
// Creates a new domain.
|
||||||
global.domainNewHandler = function() {
|
global.domainNewHandler = function() {
|
||||||
var json = {
|
var json = {
|
||||||
"ownerToken": global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
"name": $("#new-domain-name").val(),
|
"name": $("#new-domain-name").val(),
|
||||||
"domain": $("#new-domain-domain").val(),
|
"domain": $("#new-domain-domain").val(),
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@
|
|||||||
// Refreshes the list of domains.
|
// Refreshes the list of domains.
|
||||||
global.domainRefresh = function(callback) {
|
global.domainRefresh = function(callback) {
|
||||||
var json = {
|
var json = {
|
||||||
ownerToken: global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
};
|
};
|
||||||
|
|
||||||
global.post(global.commentoOrigin + "/api/domain/list", json, function(resp) {
|
global.post(global.commentoOrigin + "/api/domain/list", json, function(resp) {
|
||||||
@ -107,7 +107,7 @@
|
|||||||
// Updates a domain with the backend.
|
// Updates a domain with the backend.
|
||||||
global.domainUpdate = function(domain, callback) {
|
global.domainUpdate = function(domain, callback) {
|
||||||
var json = {
|
var json = {
|
||||||
"ownerToken": global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
"domain": domain,
|
"domain": domain,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -126,7 +126,7 @@
|
|||||||
// Deletes a domain.
|
// Deletes a domain.
|
||||||
global.domainDelete = function(domain, callback) {
|
global.domainDelete = function(domain, callback) {
|
||||||
var json = {
|
var json = {
|
||||||
"ownerToken": global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
"domain": domain,
|
"domain": domain,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
var data = global.dashboard.$data;
|
var data = global.dashboard.$data;
|
||||||
|
|
||||||
var json = {
|
var json = {
|
||||||
"ownerToken": global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
"domain": data.domains[data.cd].domain,
|
"domain": data.domains[data.cd].domain,
|
||||||
"url": url,
|
"url": url,
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
var email = $("#new-mod").val();
|
var email = $("#new-mod").val();
|
||||||
|
|
||||||
var json = {
|
var json = {
|
||||||
"ownerToken": global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
"domain": data.domains[data.cd].domain,
|
"domain": data.domains[data.cd].domain,
|
||||||
"email": email,
|
"email": email,
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@
|
|||||||
var data = global.dashboard.$data;
|
var data = global.dashboard.$data;
|
||||||
|
|
||||||
var json = {
|
var json = {
|
||||||
"ownerToken": global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
"domain": data.domains[data.cd].domain,
|
"domain": data.domains[data.cd].domain,
|
||||||
"email": email,
|
"email": email,
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
var data = global.dashboard.$data;
|
var data = global.dashboard.$data;
|
||||||
|
|
||||||
var json = {
|
var json = {
|
||||||
"ownerToken": global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
"domain": data.domains[data.cd].domain,
|
"domain": data.domains[data.cd].domain,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
global.cookieSet("ownerToken", resp.ownerToken);
|
global.cookieSet("commentoOwnerToken", resp.ownerToken);
|
||||||
document.location = "/dashboard";
|
document.location = "/dashboard";
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
(function (global, document) {
|
(function (global, document) {
|
||||||
|
|
||||||
global.logout = function() {
|
global.logout = function() {
|
||||||
global.cookieSet("ownerToken", "");
|
global.cookieSet("commentoOwnerToken", "");
|
||||||
document.location = "/login";
|
document.location = "/login";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
// Get self details.
|
// Get self details.
|
||||||
global.selfGet = function(callback) {
|
global.selfGet = function(callback) {
|
||||||
var json = {
|
var json = {
|
||||||
"ownerToken": global.cookieGet("ownerToken"),
|
"ownerToken": global.cookieGet("commentoOwnerToken"),
|
||||||
};
|
};
|
||||||
|
|
||||||
global.post(global.commentoOrigin + "/api/owner/self", json, function(resp) {
|
global.post(global.commentoOrigin + "/api/owner/self", json, function(resp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user