mirror of
https://github.com/lordmathis/lemma.git
synced 2025-11-06 07:54:22 +00:00
Initial git sorage backend implementation
This commit is contained in:
@@ -31,7 +31,18 @@ func main() {
|
||||
if workdir == "" {
|
||||
workdir = "./data"
|
||||
}
|
||||
fs := filesystem.New(workdir)
|
||||
|
||||
settings, err := database.GetSettings(1) // Assuming user ID 1 for now
|
||||
if err != nil {
|
||||
log.Print("Settings not found, using default settings")
|
||||
}
|
||||
fs := filesystem.New(workdir, &settings)
|
||||
|
||||
if settings.Settings.GitEnabled {
|
||||
if err := fs.InitializeGitRepo(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
// Set up router
|
||||
r := chi.NewRouter()
|
||||
|
||||
Reference in New Issue
Block a user