π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
querying storage in families table as convertRowsToFamilyMember also expects storage
mngshm43b9ae6539f1
diff --git a/server/pkg/repo/family.go b/server/pkg/repo/family.goindex 02a6f5e65c..75a3626e2c 100644--- a/server/pkg/repo/family.go+++ b/server/pkg/repo/family.go@@ -135,7 +135,7 @@ func (repo *FamilyRepository) convertRowToFamilyMember(row *sql.Row) (ente.Famil// GetMembersWithStatus returns all the members in a family managed by given inviterfunc (repo *FamilyRepository) GetMembersWithStatus(adminID int64, statuses []ente.MemberStatus) ([]ente.FamilyMember, error) {- rows, err := repo.DB.Query(`SELECT id, admin_id, member_id, status from families+ rows, err := repo.DB.Query(`SELECT id, admin_id, member_id, status, storage from familiesWHERE admin_id = $1 and status = ANY($2)`, adminID, pq.Array(statuses))if err != nil {@@ -144,7 +144,7 @@ func (repo *FamilyRepository) GetMembersWithStatus(adminID int64, statuses []entreturn convertRowsToFamilyMember(rows)}-// UpdateStorage will set the value of storage for the given user by the Admin of the family.+// SetStorage will set the storage limit for a member by the Admin of the family.func (repo *FamilyRepository) SetStorageLimit(ctx context.Context, storageLimit int64, token string) error {// Need to ad a check related to admin here_, err := repo.DB.ExecContext(ctx, `UPDATE families SET storage=$1 WHERE token=$2`, storageLimit, token)