break;
case "rfid":
if (identifier_registration) {
- ajax("POST", "user/identifier/add", JSON.stringify({ id: msg.uid }), "user");
+ ajax("POST", "user/identifier/add", JSON.stringify({ id: msg.uid }), "content");
addIdentifier_finish();
} else {
function login(id) {
- ajax("POST", "login", id, "user");
+ ajax("POST", "login", id, "content");
id_user = id;
countingTimeLogout(120);
}
function logout() {
sendReset();
- ajax("GET", "logout", "", "user");
+ ajax("GET", "logout", "", "content");
id_user = undefined;
timeToLogout = undefined;
identifier_registration = false;
}
function renameUser() {
- ajax("GET", "user/rename?name=" + document.getElementById("username").value, "", "user");
+ ajax("GET", "user/rename?name=" + document.getElementById("username").value, "", "content");
}
function getFlavor(letter) {
flavor: flavor
});
if (id_user) {
- ajax("POST", "coffee/add", data, "user");
+ ajax("POST", "coffee/add", data, "content");
flavorChosen = flavor;
id_user = undefined;
countingTimeLogout(10); //mean 10 seconds
});
if (id_user) {
eventMsg = "You have " + action_msg + ". Thanks!"
- ajax("POST", "event", data, "user");
+ ajax("POST", "event", data, "content");
window.scrollTo(0, 0); // Scroll up
}
}
}
function disableIdentifier(id) {
- ajax("POST", "user/identifier/disable", JSON.stringify({ id: id }), "user");
+ ajax("POST", "user/identifier/disable", JSON.stringify({ id: id }), "content");
}
function renameIdentifier(i) {
name: document.getElementById("identifier_name_" + i).value
});
- ajax("POST", "user/identifier/rename", data, "user");
+ ajax("POST", "user/identifier/rename", data, "content");
}
function sendLog(json) {