SpaceNinjaServer/src/controllers/api/abandonLibraryDailyTaskController.ts
Sainan 28a36052d9 feat: daily synthesis (#1014)
Closes #386
Closes #533

Reviewed-on: OpenWF/SpaceNinjaServer#1014
Co-authored-by: Sainan <sainan@calamity.inc>
Co-committed-by: Sainan <sainan@calamity.inc>
2025-02-25 17:31:52 -08:00

12 lines
486 B
TypeScript

import { getInventory } from "@/src/services/inventoryService";
import { getAccountIdForRequest } from "@/src/services/loginService";
import { RequestHandler } from "express";
export const abandonLibraryDailyTaskController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req);
const inventory = await getInventory(accountId);
inventory.LibraryActiveDailyTaskInfo = undefined;
await inventory.save();
res.status(200).end();
};