π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Refactor MemoryShareRepository to use memoryHost for public memory share URLs
AmanRajSinghMourya83fb0f988724
diff --git a/server/pkg/repo/memory_share.go b/server/pkg/repo/memory_share.goindex 840094425f..491ef3ce9d 100644--- a/server/pkg/repo/memory_share.go+++ b/server/pkg/repo/memory_share.go@@ -14,25 +14,25 @@ import (// MemoryShareRepository is an implementation of the repository for memory sharestype MemoryShareRepository struct {- DB *sql.DB- albumHost string+ DB *sql.DB+ memoryHost string}// NewMemoryShareRepository creates a new MemoryShareRepositoryfunc NewMemoryShareRepository(db *sql.DB) *MemoryShareRepository {- albumHost := viper.GetString("apps.public-albums")- if albumHost == "" {- albumHost = "https://albums.ente.io"+ memoryHost := viper.GetString("apps.public-memories")+ if memoryHost == "" {+ memoryHost = "https://memories.ente.io"}return &MemoryShareRepository{- DB: db,- albumHost: albumHost,+ DB: db,+ memoryHost: memoryHost,}}// GetMemoryShareURL returns the public URL for a memory sharefunc (r *MemoryShareRepository) GetMemoryShareURL(accessToken string) string {- return fmt.Sprintf("%s/memory?t=%s", r.albumHost, accessToken)+ return fmt.Sprintf("%s/%s", r.memoryHost, accessToken)}// Create creates a new memory share and returns it with the generated ID