feat: add services and separate further

This commit is contained in:
2026-04-29 13:25:38 +02:00
parent 6c28aea655
commit 8f6b1efea0
16 changed files with 318 additions and 168 deletions
+6 -6
View File
@@ -33,13 +33,13 @@ func scanFS(env bootstrap.Environment) (map[string]struct{}, error) {
return nil, err
}
res := make(map[string]struct{})
resp := make(map[string]struct{})
for _, f := range fsFiles {
full := filepath.Join(env.ContentDirectory, f.Name())
res[full] = struct{}{}
resp[full] = struct{}{}
}
return res, nil
return resp, nil
}
func scanDB(db *gorm.DB) (map[string]database.File, error) {
@@ -48,10 +48,10 @@ func scanDB(db *gorm.DB) (map[string]database.File, error) {
return nil, err
}
res := make(map[string]database.File)
resp := make(map[string]database.File)
for _, f := range files {
res[f.FilePath] = f
resp[f.FilePath] = f
}
return res, nil
return resp, nil
}