reuse inventory to get account's guild
All checks were successful
Build / build (22) (push) Successful in 39s
Build / build (20) (push) Successful in 1m3s
Build / build (18) (push) Successful in 57s
Build / build (18) (pull_request) Successful in 42s
Build / build (20) (pull_request) Successful in 1m4s
Build / build (22) (pull_request) Successful in 54s
All checks were successful
Build / build (22) (push) Successful in 39s
Build / build (20) (push) Successful in 1m3s
Build / build (18) (push) Successful in 57s
Build / build (18) (pull_request) Successful in 42s
Build / build (20) (pull_request) Successful in 1m4s
Build / build (22) (pull_request) Successful in 54s
This commit is contained in:
parent
cb626fcf68
commit
f6ecc5cbfb
@ -13,7 +13,7 @@ import { RequestHandler } from "express";
|
||||
|
||||
export const abortDojoComponentController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId, "LevelKeys");
|
||||
const inventory = await getInventory(accountId, "GuildId LevelKeys");
|
||||
const guild = await getGuildForRequestEx(req, inventory);
|
||||
const request = JSON.parse(String(req.body)) as IAbortDojoComponentRequest;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { getDojoClient, getGuildForRequest, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||
import { getInventory } from "@/src/services/inventoryService";
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { GuildPermission } from "@/src/types/guildTypes";
|
||||
@ -6,8 +6,8 @@ import { RequestHandler } from "express";
|
||||
|
||||
export const abortDojoComponentDestructionController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId, "LevelKeys");
|
||||
const guild = await getGuildForRequest(req);
|
||||
const inventory = await getInventory(accountId, "GuildId LevelKeys");
|
||||
const guild = await getGuildForRequestEx(req, inventory);
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Architect))) {
|
||||
res.json({ DojoRequestStatus: -1 });
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { getDojoClient, getGuildForRequest, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||
import { logger } from "@/src/utils/logger";
|
||||
import { GuildPermission, IDojoComponentDatabase } from "@/src/types/guildTypes";
|
||||
import { Types } from "mongoose";
|
||||
@ -8,8 +8,8 @@ import { getInventory } from "@/src/services/inventoryService";
|
||||
|
||||
export const changeDojoRootController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId, "LevelKeys");
|
||||
const guild = await getGuildForRequest(req);
|
||||
const inventory = await getInventory(accountId, "GuildId LevelKeys");
|
||||
const guild = await getGuildForRequestEx(req, inventory);
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Architect))) {
|
||||
res.json({ DojoRequestStatus: -1 });
|
||||
return;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {
|
||||
getDojoClient,
|
||||
getGuildForRequest,
|
||||
getGuildForRequestEx,
|
||||
hasAccessToDojo,
|
||||
hasGuildPermission,
|
||||
removeDojoDeco
|
||||
@ -12,8 +12,8 @@ import { RequestHandler } from "express";
|
||||
|
||||
export const destroyDojoDecoController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId, "LevelKeys");
|
||||
const guild = await getGuildForRequest(req);
|
||||
const inventory = await getInventory(accountId, "GuildId LevelKeys");
|
||||
const guild = await getGuildForRequestEx(req, inventory);
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Decorator))) {
|
||||
res.json({ DojoRequestStatus: -1 });
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { getDojoClient, getGuildForRequest, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||
import { getInventory } from "@/src/services/inventoryService";
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { GuildPermission } from "@/src/types/guildTypes";
|
||||
@ -8,8 +8,8 @@ import { ExportDojoRecipes } from "warframe-public-export-plus";
|
||||
|
||||
export const placeDecoInComponentController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId, "LevelKeys");
|
||||
const guild = await getGuildForRequest(req);
|
||||
const inventory = await getInventory(accountId, "GuildId LevelKeys");
|
||||
const guild = await getGuildForRequestEx(req, inventory);
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Decorator))) {
|
||||
res.json({ DojoRequestStatus: -1 });
|
||||
return;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { config } from "@/src/services/configService";
|
||||
import { getDojoClient, getGuildForRequest, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||
import { getDojoClient, getGuildForRequestEx, hasAccessToDojo, hasGuildPermission } from "@/src/services/guildService";
|
||||
import { getInventory } from "@/src/services/inventoryService";
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { GuildPermission } from "@/src/types/guildTypes";
|
||||
@ -7,8 +7,8 @@ import { RequestHandler } from "express";
|
||||
|
||||
export const queueDojoComponentDestructionController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId, "LevelKeys");
|
||||
const guild = await getGuildForRequest(req);
|
||||
const inventory = await getInventory(accountId, "GuildId LevelKeys");
|
||||
const guild = await getGuildForRequestEx(req, inventory);
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Architect))) {
|
||||
res.json({ DojoRequestStatus: -1 });
|
||||
return;
|
||||
|
@ -2,7 +2,7 @@ import { RequestHandler } from "express";
|
||||
import { GuildPermission, IDojoComponentClient } from "@/src/types/guildTypes";
|
||||
import {
|
||||
getDojoClient,
|
||||
getGuildForRequest,
|
||||
getGuildForRequestEx,
|
||||
hasAccessToDojo,
|
||||
hasGuildPermission,
|
||||
processDojoBuildMaterialsGathered,
|
||||
@ -21,8 +21,8 @@ interface IStartDojoRecipeRequest {
|
||||
|
||||
export const startDojoRecipeController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId, "LevelKeys");
|
||||
const guild = await getGuildForRequest(req);
|
||||
const inventory = await getInventory(accountId, "GuildId LevelKeys");
|
||||
const guild = await getGuildForRequestEx(req, inventory);
|
||||
if (!hasAccessToDojo(inventory) || !(await hasGuildPermission(guild, accountId, GuildPermission.Architect))) {
|
||||
res.json({ DojoRequestStatus: -1 });
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user