forked from OpenWF/SpaceNinjaServer
		
	rename
This commit is contained in:
		
							parent
							
								
									aeb2718ccd
								
							
						
					
					
						commit
						c1e76c1317
					
				@ -4,9 +4,9 @@ import { broadcastInventoryUpdate } from "../../services/wsService.ts";
 | 
			
		||||
import { getInventory } from "../../services/inventoryService.ts";
 | 
			
		||||
import type { TEquipmentKey } from "../../types/inventoryTypes/inventoryTypes.ts";
 | 
			
		||||
 | 
			
		||||
export const unlockLevelCupController: RequestHandler = async (req, res) => {
 | 
			
		||||
export const unlockLevelCapController: RequestHandler = async (req, res) => {
 | 
			
		||||
    const accountId = await getAccountIdForRequest(req);
 | 
			
		||||
    const data = req.body as IUnlockLevelCupRequest;
 | 
			
		||||
    const data = req.body as IunlockLevelCapRequest;
 | 
			
		||||
    const inventory = await getInventory(accountId, data.Category);
 | 
			
		||||
    const equipment = inventory[data.Category].id(data.ItemId)!;
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,7 @@ export const unlockLevelCupController: RequestHandler = async (req, res) => {
 | 
			
		||||
    broadcastInventoryUpdate(req);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
interface IUnlockLevelCupRequest {
 | 
			
		||||
interface IunlockLevelCapRequest {
 | 
			
		||||
    Category: TEquipmentKey;
 | 
			
		||||
    ItemId: string;
 | 
			
		||||
    Polarized: number;
 | 
			
		||||
@ -41,7 +41,7 @@ import { manageQuestsController } from "../controllers/custom/manageQuestsContro
 | 
			
		||||
import { setEvolutionProgressController } from "../controllers/custom/setEvolutionProgressController.ts";
 | 
			
		||||
import { setBoosterController } from "../controllers/custom/setBoosterController.ts";
 | 
			
		||||
import { updateFingerprintController } from "../controllers/custom/updateFingerprintController.ts";
 | 
			
		||||
import { unlockLevelCupController } from "../controllers/custom/unlockLevelCupController.ts";
 | 
			
		||||
import { unlockLevelCapController } from "../controllers/custom/unlockLevelCapController.ts";
 | 
			
		||||
import { changeModularPartsController } from "../controllers/custom/changeModularPartsController.ts";
 | 
			
		||||
import { editSuitInvigorationUpgradeController } from "../controllers/custom/editSuitInvigorationUpgradeController.ts";
 | 
			
		||||
import { setAccountCheatController } from "../controllers/custom/setAccountCheatController.ts";
 | 
			
		||||
@ -90,7 +90,7 @@ customRouter.post("/manageQuests", manageQuestsController);
 | 
			
		||||
customRouter.post("/setEvolutionProgress", setEvolutionProgressController);
 | 
			
		||||
customRouter.post("/setBooster", setBoosterController);
 | 
			
		||||
customRouter.post("/updateFingerprint", updateFingerprintController);
 | 
			
		||||
customRouter.post("/unlockLevelCup", unlockLevelCupController);
 | 
			
		||||
customRouter.post("/unlockLevelCap", unlockLevelCapController);
 | 
			
		||||
customRouter.post("/changeModularParts", changeModularPartsController);
 | 
			
		||||
customRouter.post("/editSuitInvigorationUpgrade", editSuitInvigorationUpgradeController);
 | 
			
		||||
customRouter.post("/setAccountCheat", setAccountCheatController);
 | 
			
		||||
 | 
			
		||||
@ -822,7 +822,7 @@ function updateInventory() {
 | 
			
		||||
                                a.href = "#";
 | 
			
		||||
                                a.onclick = function (event) {
 | 
			
		||||
                                    event.preventDefault();
 | 
			
		||||
                                    unlockLevelCup(
 | 
			
		||||
                                    unlockLevelCap(
 | 
			
		||||
                                        category,
 | 
			
		||||
                                        item.ItemId.$oid,
 | 
			
		||||
                                        (itemMap[item.ItemType].maxLevelCap - 30) / 2
 | 
			
		||||
@ -2774,10 +2774,10 @@ function gildEquipment(category, oid) {
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function unlockLevelCup(category, oid, formas) {
 | 
			
		||||
function unlockLevelCap(category, oid, formas) {
 | 
			
		||||
    revalidateAuthz().then(() => {
 | 
			
		||||
        $.post({
 | 
			
		||||
            url: "/custom/unlockLevelCup?" + window.authz,
 | 
			
		||||
            url: "/custom/unlockLevelCap?" + window.authz,
 | 
			
		||||
            contentType: "application/json",
 | 
			
		||||
            data: JSON.stringify({
 | 
			
		||||
                Category: category,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user