mirror of
https://github.com/TheGreyDiamond/elevatormapRewritten.git
synced 2025-12-16 23:10:45 +01:00
Added names to submissions and made create elevator login protected
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
res = JSON.parse(httpGet("/api/getElevatorById?id=" + this.options.id));
|
||||
if (res.state == "Ok") {
|
||||
visitStates = [
|
||||
"Test elevator",
|
||||
"Test elevator",
|
||||
"Public",
|
||||
"On private property",
|
||||
"Public but locked",
|
||||
@@ -148,6 +148,13 @@
|
||||
"#VISIT",
|
||||
visitStates[res.results[0].visitabilty]
|
||||
);
|
||||
try{
|
||||
var username = JSON.parse(httpGet("/api/resolveNameById?id=" + res.results[0].creator)).results[0].username
|
||||
}catch{
|
||||
username = "Unknown"
|
||||
}
|
||||
|
||||
inspector = inspector.replace("#CREATOR", username);
|
||||
document.getElementById("inspector").innerHTML = inspector;
|
||||
|
||||
// Make gallery
|
||||
|
||||
Reference in New Issue
Block a user