/** * @copyright nhcarrigan * @license Naomi's Public License * @author Naomi Carrigan */ import type { App } from "../interfaces/app.js"; /** * Updates the cache of sanctions. * @param app - The application instance. */ export const updateCache = async(app: App): Promise => { app.cacheUpdated = new Date(); // eslint-disable-next-line require-atomic-updates -- We're allowing this so we can update the cache on an interval. app.sanctions = await app.database.sanctions.findMany(); };