Compare commits
No commits in common. "e73c6e40ebda7d2b69c6de15b1d99b715ac69aac" and "fecae991d3dbf0e9f99c7a4e292d7cee113ee5d9" have entirely different histories.
e73c6e40eb
...
fecae991d3
@ -54,7 +54,7 @@ export const guildTechController: RequestHandler = async (req, res) => {
|
||||
}
|
||||
res.json({ TechProjects: techProjects });
|
||||
} else if (data.Action == "Start") {
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Tech))) {
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Fabricator))) {
|
||||
res.status(400).send("-1").end();
|
||||
return;
|
||||
}
|
||||
@ -193,10 +193,6 @@ export const guildTechController: RequestHandler = async (req, res) => {
|
||||
// Not a mistake: This response uses `inventoryChanges` instead of `InventoryChanges`.
|
||||
res.json({ inventoryChanges: inventoryChanges });
|
||||
} else if (data.Action == "Pause") {
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Tech))) {
|
||||
res.status(400).send("-1").end();
|
||||
return;
|
||||
}
|
||||
const project = guild.TechProjects!.find(x => x.ItemType == data.RecipeType)!;
|
||||
project.State = -2;
|
||||
guild.ActiveDojoColorResearch = "";
|
||||
@ -204,10 +200,6 @@ export const guildTechController: RequestHandler = async (req, res) => {
|
||||
await removePigmentsFromGuildMembers(guild._id);
|
||||
res.end();
|
||||
} else if (data.Action == "Unpause") {
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Tech))) {
|
||||
res.status(400).send("-1").end();
|
||||
return;
|
||||
}
|
||||
const project = guild.TechProjects!.find(x => x.ItemType == data.RecipeType)!;
|
||||
project.State = 0;
|
||||
guild.ActiveDojoColorResearch = data.RecipeType;
|
||||
|
Loading…
x
Reference in New Issue
Block a user