ultisuite-backend/internal/api/drive/service_roots_share.go
R3D347HR4Y 1d063237b9
Some checks are pending
CI / Go tests (push) Waiting to run
CI / Integration tests (push) Waiting to run
CI / DB migrations (push) Waiting to run
feat(transcription): integrate Faster Whisper for Jitsi transcriptions
- Added support for Faster Whisper transcription via Jigasi and Skynet.
- Updated .env.example to include new environment variables for transcription settings.
- Enhanced Jitsi Docker Compose configuration to include Skynet and Jigasi services.
- Introduced new API endpoints for managing organizational folders in the drive service.
- Updated Nextcloud initialization script to enable external file mounting.
- Improved error handling and response structures in the drive API.
- Added new properties for organization settings related to transcription and agenda management.
2026-06-12 19:10:18 +02:00

43 lines
1.3 KiB
Go

package drive
import (
"context"
"github.com/ultisuite/ulti-backend/internal/driveroot"
"github.com/ultisuite/ulti-backend/internal/nextcloud"
)
func (s *Service) CreateShareAtRoot(ctx context.Context, ncUserID string, ref driveroot.Ref, req createShareRequest, permissions int) (*nextcloud.ShareInfo, error) {
if usesAlternateRoot(ref) {
file, err := s.StatFileAtRoot(ctx, ncUserID, ref)
if err != nil {
return nil, err
}
return s.CreateShare(ctx, ncUserID, file.Path, req, permissions)
}
return s.CreateShare(ctx, ncUserID, ref.Path, req, permissions)
}
func (s *Service) SetFavoriteAtRoot(ctx context.Context, ncUserID string, ref driveroot.Ref, favorite bool) error {
if usesAlternateRoot(ref) {
// Favorites are only supported on personal NC file paths today.
file, err := s.StatFileAtRoot(ctx, ncUserID, ref)
if err != nil {
return err
}
return s.SetFavorite(ctx, ncUserID, file.Path, favorite)
}
return s.SetFavorite(ctx, ncUserID, ref.Path, favorite)
}
func (s *Service) ListSharesAtRoot(ctx context.Context, ncUserID string, ref driveroot.Ref) ([]nextcloud.ShareInfo, error) {
if usesAlternateRoot(ref) {
file, err := s.StatFileAtRoot(ctx, ncUserID, ref)
if err != nil {
return nil, err
}
return s.ListShares(ctx, ncUserID, file.Path)
}
return s.ListShares(ctx, ncUserID, ref.Path)
}