Feat: add POSIX DB projection
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/jackc/pgx/v5"
|
||||
|
||||
"moku-backend/internal/database"
|
||||
"moku-backend/internal/posixproj"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -413,6 +414,10 @@ func (service *Service) SaveStructure(ctx context.Context, input SaveStructureIn
|
||||
return StructureRecord{}, err
|
||||
}
|
||||
|
||||
if err := posixproj.NewProjector(service.db, service.posixRoot).Rebuild(ctx); err != nil {
|
||||
return StructureRecord{}, fmt.Errorf("rebuild POSIX projection: %w", err)
|
||||
}
|
||||
|
||||
return StructureRecord{
|
||||
Installation: installation,
|
||||
Organization: organization,
|
||||
|
||||
Reference in New Issue
Block a user