Skip to content

Commit c97c9ab

Browse files
committed
fix: update database path in Database class and .gitignore to reflect new structure
1 parent cdcf5fc commit c97c9ab

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ env.json
66

77
storage/*
88
!storage/example/
9-
src/data/database.json
9+
src/data/database.json
10+
src/server/data/database.json

src/utils/database.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ interface DatabaseSchema {
2626
}
2727

2828
export class Database {
29-
private static dbPath = path.join(process.cwd(), 'src', 'data', 'database.json');
29+
private static dbPath = path.join(process.cwd(), 'src', 'server', 'data', 'database.json');
3030
private static db: DatabaseSchema | null = null;
3131

3232
/**
3333
* Initialize the database
3434
*/
3535
static async initialize(): Promise<void> {
3636
try {
37-
const dataDir = path.join(process.cwd(), 'src', 'data');
37+
const dataDir = path.join(process.cwd(), 'src', 'server', 'data');
3838

3939
// Create data directory if it doesn't exist
4040
if (!fs.existsSync(dataDir)) {

0 commit comments

Comments
 (0)