diff --git a/src/controllers/custom/getGuildController.ts b/src/controllers/custom/getGuildController.ts
index 18df338f..4902c3c1 100644
--- a/src/controllers/custom/getGuildController.ts
+++ b/src/controllers/custom/getGuildController.ts
@@ -33,7 +33,8 @@ export const getGuildController: RequestHandler = async (req, res) => {
...guild.toObject(),
Members: members
});
+ } else {
+ res.status(400).end();
}
}
- res.end();
};
diff --git a/static/webui/index.html b/static/webui/index.html
index 9375ecd4..5bf8c628 100644
--- a/static/webui/index.html
+++ b/static/webui/index.html
@@ -59,7 +59,7 @@
-
+
diff --git a/static/webui/script.js b/static/webui/script.js
index b262a56e..ac24fc5e 100644
--- a/static/webui/script.js
+++ b/static/webui/script.js
@@ -151,7 +151,7 @@ function doLogout() {
function renameAccount(taken_name) {
const newname = window.prompt(
(taken_name ? loc("code_changeNameRetry").split("|NAME|").join(taken_name) + " " : "") +
- loc("code_changeNameConfirm")
+ loc("code_changeNameConfirm")
);
if (newname) {
revalidateAuthz().then(() => {
@@ -653,7 +653,12 @@ function updateInventory() {
req.done(data => {
window.itemListPromise.then(itemMap => {
window.didInitialInventoryUpdate = true;
- if (data.GuildId.$oid) window.guildId = data.GuildId.$oid;
+ if (data.GuildId.$oid) {
+ window.guildId = data.GuildId.$oid;
+ document.getElementById("nav-guildView").classList.remove("d-none");
+ } else {
+ document.getElementById("nav-guildView").classList.add("d-none");
+ }
const modularWeapons = [
"/Lotus/Weapons/SolarisUnited/Primary/LotusModularPrimary",
@@ -1790,7 +1795,9 @@ function updateInventory() {
let userAlliancePermisssions;
if (userGuildMember && userGuildMember.Rank <= 1) {
- userAlliancePermisssions = allianceData.Clans.find(c => c._id.$oid === guildId).Permissions;
+ userAlliancePermisssions = allianceData.Clans.find(
+ c => c._id.$oid === guildId
+ ).Permissions;
}
document.getElementById("Alliance-list").innerHTML = "";
allianceData.Clans.forEach(clan => {
@@ -1807,7 +1814,11 @@ function updateInventory() {
const td = document.createElement("td");
td.classList = "text-end text-nowrap";
- if (!(clan.Permissions & 1) && userAlliancePermisssions && userAlliancePermisssions & 1) {
+ if (
+ !(clan.Permissions & 1) &&
+ userAlliancePermisssions &&
+ userAlliancePermisssions & 1
+ ) {
const a = document.createElement("a");
a.href = "#";
a.onclick = function (event) {
@@ -1871,13 +1882,13 @@ function changeGuildRank(guildId, targetId, rankChange) {
revalidateAuthz().then(() => {
const req = $.get(
"/api/changeGuildRank.php?" +
- window.authz +
- "&guildId=" +
- guildId +
- "&targetId=" +
- targetId +
- "&rankChange=" +
- rankChange
+ window.authz +
+ "&guildId=" +
+ guildId +
+ "&targetId=" +
+ targetId +
+ "&rankChange=" +
+ rankChange
);
req.done(() => {
updateInventory();
@@ -2440,9 +2451,9 @@ function maxRankAllEquipment(categories) {
data[category].forEach(item => {
const maxXP =
category === "Suits" ||
- category === "SpaceSuits" ||
- category === "Sentinels" ||
- category === "Hoverboards"
+ category === "SpaceSuits" ||
+ category === "Sentinels" ||
+ category === "Hoverboards"
? 1_600_000
: 800_000;
@@ -3177,13 +3188,13 @@ function doPushArchonCrystalUpgrade() {
revalidateAuthz().then(() => {
$.get(
"/custom/pushArchonCrystalUpgrade?" +
- window.authz +
- "&oid=" +
- urlParams.get("itemId") +
- "&type=" +
- uniqueName +
- "&count=" +
- $("#archon-crystal-add-count").val()
+ window.authz +
+ "&oid=" +
+ urlParams.get("itemId") +
+ "&type=" +
+ uniqueName +
+ "&count=" +
+ $("#archon-crystal-add-count").val()
).done(function () {
$("[list='datalist-archonCrystalUpgrades']").val("");
updateInventory();