Skip to content

Commit

Permalink
# Removed auto creating image folders
Browse files Browse the repository at this point in the history
  • Loading branch information
crazidev committed Nov 4, 2023
1 parent 8be97bb commit 98cfb5e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,6 @@ router.all("/sync", async function (req: Request, res: Response) {
console.log('init database');
initModels(db);

if (!fs.existsSync('public/profile_images/')) {
fs.mkdirSync('public/profile_images/', { recursive: true });
console.log('Creating folder public/profile_images/')
}

if (!fs.existsSync('public/id_documents/')) {
fs.mkdirSync('public/id_documents/', { recursive: true });
console.log('Creating folder public/id_documents/')
}

if (!fs.existsSync('public/livechat/')) {
fs.mkdirSync('public/livechat/', { recursive: true });
console.log('Creating folder public/livechat/')
}

} catch (error) {
console.error('Unable to connect to the database:', error);
}
Expand Down

0 comments on commit 98cfb5e

Please sign in to comment.