mirror of
https://github.com/ente-io/ente.git
synced 2025-07-24 04:47:32 +00:00
if storageLimit == null, set no limit for member
This commit is contained in:
parent
5a72d62555
commit
c46c27d21d
@ -51,7 +51,7 @@ type FamilyMember struct {
|
||||
|
||||
type ModifyMemberStorage struct {
|
||||
ID uuid.UUID `json:"id" binding:"required"`
|
||||
StorageLimit *int64 `json:"storageLimit" binding:"required"`
|
||||
StorageLimit *int64 `json:"storageLimit"`
|
||||
}
|
||||
|
||||
type FamilyMemberResponse struct {
|
||||
|
@ -198,7 +198,7 @@ func (repo *FamilyRepository) RemoveMember(ctx context.Context, adminID int64, m
|
||||
|
||||
// UpdateStorage is used to set Pre-existing Members Storage Limit.
|
||||
func (repo *FamilyRepository) ModifyMemberStorage(ctx context.Context, adminID int64, id uuid.UUID, storageLimit *int64) error {
|
||||
_, err := repo.DB.Exec(`UPDATE families SET storage_limit=$1 where id=$2`, *storageLimit, id)
|
||||
_, err := repo.DB.Exec(`UPDATE families SET storage_limit=$1 where id=$2`, storageLimit, id)
|
||||
if err != nil {
|
||||
return stacktrace.Propagate(err, "Could not update Members Storage Limit")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user