VRFS-877 band photo bug fixes
This commit is contained in:
parent
d7a6253b76
commit
932de5cc35
|
|
@ -229,8 +229,8 @@
|
|||
userNames = [];
|
||||
userIds = [];
|
||||
userPhotoUrls = [];
|
||||
//bandId = "1158c8b6-4c92-47dc-82bf-1e390c4f9b2c";
|
||||
bandId = $("#hdn-band-id").val();
|
||||
bandId = "1158c8b6-4c92-47dc-82bf-1e390c4f9b2c";
|
||||
//bandId = $("#hdn-band-id").val();
|
||||
resetForm();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -197,9 +197,9 @@ class ApiBandsController < ApiController
|
|||
@band.update_photo(original_fpfile, cropped_fpfile, crop_selection, Rails.application.config.aws_bucket_public)
|
||||
|
||||
if @band.errors.any?
|
||||
respond_with @band, status: :unprocessable_entity
|
||||
render :json => { :message => "Unexpected error updating photo."}, :status => :unprocessable_entity
|
||||
else
|
||||
respond_with @band, responder: ApiResponder, status: 200
|
||||
render :json => {}, :status => :ok
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -207,9 +207,9 @@ class ApiBandsController < ApiController
|
|||
@band.delete_photo(Rails.application.config.aws_bucket_public)
|
||||
|
||||
if @band.errors.any?
|
||||
respond_with @band, status: :unprocessable_entity
|
||||
render :json => { :message => "Unexpected error deleting photo."}, :status => :unprocessable_entity
|
||||
else
|
||||
respond_with @band, responder: ApiResponder, status: 204
|
||||
render :json => {}, :status => :ok
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue