create categories and subcategories in database and categories logic

This commit is contained in:
wt committed 2025-08-09 14:12:25 +07:00
1 parent d3d644d68f
commit 2c06975a43
4 files changed
+103 -2

No files matched your search

+7
View File
@@ -43,4 +43,11 @@ func InitDatabase() {
CreateUser(&allusers[i])
}
}
if os.Getenv("DEFAULT_CATEGORIES_FILE") != "" {
default_categories := GetCategoriesFromFile(os.Getenv("DEFAULT_CATEGORIES_FILE"))
for i := range default_categories {
CreateCategory(&default_categories[i])
}
}
}