mirror of
https://github.com/get-drexa/drive.git
synced 2025-11-30 21:41:39 +00:00
feat: create root dir on acc registration
This commit is contained in:
@@ -59,6 +59,11 @@ func (s *Service) Register(ctx context.Context, db bun.IDB, opts RegisterOptions
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
_, err = s.vfs.CreateDirectory(ctx, db, acc.ID, uuid.Nil, virtualfs.RootDirectoryName)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return acc, u, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ type FileContent struct {
|
||||
blobKey blob.Key
|
||||
}
|
||||
|
||||
const RootDirectoryName = "root"
|
||||
|
||||
func FileContentFromReader(reader io.Reader) FileContent {
|
||||
return FileContent{reader: reader}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user