Reviewed-on: #2694 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
12 lines
497 B
TypeScript
12 lines
497 B
TypeScript
import { getInventory } from "../../services/inventoryService.ts";
|
|
import { getAccountIdForRequest } from "../../services/loginService.ts";
|
|
import type { 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();
|
|
};
|