code refactoring, added router, moved download api path

This commit is contained in:
2024-02-23 10:55:33 +01:00
parent 65b0c8bc0e
commit 1cfda047cb
20 changed files with 146 additions and 41 deletions

View File

@@ -123,3 +123,12 @@ func (s *Service) DeleteTemplate(ctx context.Context, id string) error {
func (s *Service) DirectoryTree(ctx context.Context) (*internal.Stack[sys.FSNode], error) {
return sys.DirectoryTree()
}
func (s *Service) DownloadFile(ctx context.Context, id string) (*string, error) {
p, err := s.mdb.Get(id)
if err != nil {
return nil, err
}
return &p.Output.Path, nil
}