Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

fix(server): expose memory share positions

AmanRajSinghMourya1f2169c5f0f9
diff --git a/server/ente/memory_share.go b/server/ente/memory_share.go
index b48d287ce2..7fdbc53b8a 100644
--- a/server/ente/memory_share.go
+++ b/server/ente/memory_share.go
@@ -76,6 +76,7 @@ type PublicMemoryShareResponse struct {
// PublicMemoryShareFile combines file data with its re-encrypted key for public access
type PublicMemoryShareFile struct {
File File `json:"file"`
+ Position int64 `json:"position"`
EncryptedKey string `json:"encryptedKey"`
KeyDecryptionNonce string `json:"keyDecryptionNonce"`
}
diff --git a/server/migrations/117_create_memory_shares.down.sql b/server/migrations/118_create_memory_shares.down.sql
similarity index 100%
rename from server/migrations/117_create_memory_shares.down.sql
rename to server/migrations/118_create_memory_shares.down.sql
diff --git a/server/migrations/117_create_memory_shares.up.sql b/server/migrations/118_create_memory_shares.up.sql
similarity index 100%
rename from server/migrations/117_create_memory_shares.up.sql
rename to server/migrations/118_create_memory_shares.up.sql
diff --git a/server/pkg/controller/public/memory_share.go b/server/pkg/controller/public/memory_share.go
index 534d213e50..231d9d7d1c 100644
--- a/server/pkg/controller/public/memory_share.go
+++ b/server/pkg/controller/public/memory_share.go
@@ -77,6 +77,7 @@ func (c *MemoryShareController) GetPublicFiles(ctx context.Context, shareID int6
publicFile := ente.PublicMemoryShareFile{
File: *file,
+ Position: sf.Position,
EncryptedKey: sf.EncryptedKey,
KeyDecryptionNonce: sf.KeyDecryptionNonce,
}