VRFS-877 band photo work
This commit is contained in:
parent
10d9232e3f
commit
0aaa460934
|
|
@ -189,7 +189,7 @@ module JamRuby
|
|||
return band
|
||||
end
|
||||
|
||||
def update_avatar(original_fpfile, cropped_fpfile, crop_selection, aws_bucket)
|
||||
def update_photo(original_fpfile, cropped_fpfile, crop_selection, aws_bucket)
|
||||
self.updating_photo = true
|
||||
|
||||
cropped_s3_path = cropped_fpfile["key"]
|
||||
|
|
@ -203,9 +203,9 @@ module JamRuby
|
|||
)
|
||||
end
|
||||
|
||||
def delete_avatar(aws_bucket)
|
||||
def delete_photo(aws_bucket)
|
||||
|
||||
User.transaction do
|
||||
Band.transaction do
|
||||
|
||||
unless self.cropped_s3_path.nil?
|
||||
S3Util.delete(aws_bucket, File.dirname(self.cropped_s3_path) + '/cropped.jpg')
|
||||
|
|
|
|||
Loading…
Reference in New Issue