mirror of
https://github.com/get-drexa/drive.git
synced 2025-12-06 08:11:39 +00:00
feat: impl files endpoints
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/get-drexa/drexa/internal/blob"
|
||||
"github.com/google/uuid"
|
||||
"github.com/uptrace/bun"
|
||||
)
|
||||
|
||||
type FlatKeyResolver struct{}
|
||||
@@ -19,7 +20,7 @@ func (r *FlatKeyResolver) ShouldPersistKey() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (r *FlatKeyResolver) Resolve(ctx context.Context, node *Node) (blob.Key, error) {
|
||||
func (r *FlatKeyResolver) Resolve(ctx context.Context, db bun.IDB, node *Node) (blob.Key, error) {
|
||||
if node.BlobKey == "" {
|
||||
id, err := uuid.NewV7()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user