refactor: decouple caching and DB operations from AppService, make part of consolidated getAppConfig

This commit is contained in:
Danny Avila 2025-08-20 02:03:38 -04:00
parent 28cd234a6c
commit f7ea232760
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
5 changed files with 58 additions and 33 deletions

View file

@ -24,8 +24,15 @@ const { getConvoTitle, getConvo, saveConvo, deleteConvos } = require('./Conversa
const { getPreset, getPresets, savePreset, deletePresets } = require('./Preset');
const { File } = require('~/db/models');
const seedDatabase = async () => {
await methods.initializeRoles();
await methods.seedDefaultRoles();
await methods.ensureDefaultCategories();
};
module.exports = {
...methods,
seedDatabase,
comparePassword,
findFileById,
createFile,