generated from nhcarrigan/template
feat: move from discord to web forms
This commit is contained in:
@ -3,7 +3,6 @@
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
import { errorHandler } from "../utils/errorHandler.js";
|
||||
import type { App } from "../interfaces/app.js";
|
||||
|
||||
/**
|
||||
@ -11,11 +10,7 @@ import type { App } from "../interfaces/app.js";
|
||||
* @param app - The application instance.
|
||||
*/
|
||||
export const updateCache = async(app: App): Promise<void> => {
|
||||
try {
|
||||
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();
|
||||
} catch (error) {
|
||||
await errorHandler("update cache module", error);
|
||||
}
|
||||
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();
|
||||
};
|
||||
|
Reference in New Issue
Block a user