Fix routing bugs
This commit is contained in:
parent
18d5aa9e6d
commit
1819a1f4b3
2 changed files with 3 additions and 3 deletions
BIN
app/assets/images/favicon.ico
Normal file
BIN
app/assets/images/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -56,7 +56,7 @@ module Nonprofits
|
||||||
end
|
end
|
||||||
|
|
||||||
def full_contact
|
def full_contact
|
||||||
fc = FullContactInfo.where("supporter_id=#{params[:supporter_id]}").first
|
fc = FullContactInfo.where("supporter_id=#{params[:id]}").first
|
||||||
if fc
|
if fc
|
||||||
render json: { full_contact: QueryFullContactInfos.fetch_associated_tables(fc.id) }
|
render json: { full_contact: QueryFullContactInfos.fetch_associated_tables(fc.id) }
|
||||||
else
|
else
|
||||||
|
@ -70,7 +70,7 @@ module Nonprofits
|
||||||
|
|
||||||
# post /nonprofits/:nonprofit_id/supporters
|
# post /nonprofits/:nonprofit_id/supporters
|
||||||
def create
|
def create
|
||||||
render_json { InsertSupporter.create_or_update(create_supporter_params[:nonprofit_id], params[:supporter]) }
|
render_json { InsertSupporter.create_or_update(params[:nonprofit_id], create_supporter_params.to_h) }
|
||||||
end
|
end
|
||||||
|
|
||||||
# put /nonprofits/:nonprofit_id/supporters/:id
|
# put /nonprofits/:nonprofit_id/supporters/:id
|
||||||
|
@ -109,7 +109,7 @@ module Nonprofits
|
||||||
private
|
private
|
||||||
|
|
||||||
def create_supporter_params
|
def create_supporter_params
|
||||||
params.require(:supporter).permit(:name, :address, :city, :state_code, :country, :address_line2, :first_name, :last_name, :custom_fields)
|
params.require(:supporter).permit(:name, :address, :city, :state_code, :country, :address_line2, :first_name, :last_name, :customFields)
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_supporter_params
|
def update_supporter_params
|
||||||
|
|
Loading…
Reference in a new issue