forked from OpenWF/SpaceNinjaServer
move request type
This commit is contained in:
parent
21e42284c3
commit
7d9e235a6e
@ -1,8 +1,8 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { IUpdateChallengeProgressRequest } from "@/src/types/requestTypes";
|
||||
import { addChallenges, addSeasonalChallengeHistory, getInventory } from "@/src/services/inventoryService";
|
||||
import { IChallengeProgress, ISeasonChallenge } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||
|
||||
export const updateChallengeProgressController: RequestHandler = async (req, res) => {
|
||||
const challenges = getJSONfromString<IUpdateChallengeProgressRequest>(String(req.body));
|
||||
@ -15,3 +15,9 @@ export const updateChallengeProgressController: RequestHandler = async (req, res
|
||||
|
||||
res.status(200).end();
|
||||
};
|
||||
|
||||
interface IUpdateChallengeProgressRequest {
|
||||
ChallengeProgress: IChallengeProgress[];
|
||||
SeasonChallengeHistory: ISeasonChallenge[];
|
||||
SeasonChallengeCompletions: ISeasonChallenge[];
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ import {
|
||||
IUpgradeClient
|
||||
} from "@/src/types/inventoryTypes/inventoryTypes";
|
||||
import { IGenericUpdate, IUpdateNodeIntrosResponse } from "../types/genericUpdate";
|
||||
import { IMissionInventoryUpdateRequest, IUpdateChallengeProgressRequest } from "../types/requestTypes";
|
||||
import { IMissionInventoryUpdateRequest } from "../types/requestTypes";
|
||||
import { logger } from "@/src/utils/logger";
|
||||
import { convertInboxMessage, fromStoreItem, getExalted, getKeyChainItems } from "@/src/services/itemDataService";
|
||||
import {
|
||||
|
@ -25,12 +25,6 @@ export interface IAffiliationChange {
|
||||
Title: number;
|
||||
}
|
||||
|
||||
export interface IUpdateChallengeProgressRequest {
|
||||
ChallengeProgress: IChallengeProgress[];
|
||||
SeasonChallengeHistory: ISeasonChallenge[];
|
||||
SeasonChallengeCompletions: ISeasonChallenge[];
|
||||
}
|
||||
|
||||
export type IMissionInventoryUpdateRequest = {
|
||||
MiscItems?: ITypeCount[];
|
||||
Recipes?: ITypeCount[];
|
||||
|
Loading…
x
Reference in New Issue
Block a user