Skip to content

Commit 75e70ec

Browse files
committed
Revert all contact calls to old urls to avoid mysterious csrf issues
1 parent 5ba6338 commit 75e70ec

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

civictechprojects/urls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@
7373
url(r'^api/tags', views.tags),
7474
url(r'^admin/', admin.site.urls),
7575
url(r'^contact/democracylab$', views.contact_democracylab, name='contact_democracylab'),
76+
url(r'^contact/project/(?P<project_id>[0-9]+)/$', views.contact_project_owner, name='contact_project_owner'),
77+
url(r'^contact/volunteers/(?P<project_id>[0-9]+)/$', views.contact_project_volunteers, name='contact_project_volunteers'),
78+
url(r'^contact/volunteer/(?P<application_id>[0-9]+)/$', views.contact_project_volunteer, name='contact_project_volunteer'),
79+
url(r'^contact/group/(?P<group_id>[0-9]+)/$', views.contact_group_owner, name='contact_group_owner'),
7680
url(r'', include(v2_urls)),
7781
url(r'', include(v1_urls)),
7882
url(r'^api/team$', views.team, name='team'),
@@ -82,10 +86,6 @@
8286
url(r'^api/invite/(?P<invite_id>[0-9]+)/reject$', views.reject_group_invitation, name='reject_group_invitation'),
8387
url(r'^api/group/(?P<group_id>[0-9]+)/$', views.get_group, name='get_group'),
8488
url(r'^api/event/(?P<event_id>.*)/$', views.get_event, name='get_event'),
85-
url(r'^api/contact/project/(?P<project_id>[0-9]+)/$', views.contact_project_owner, name='contact_project_owner'),
86-
url(r'^api/contact/volunteers/(?P<project_id>[0-9]+)/$', views.contact_project_volunteers, name='contact_project_volunteers'),
87-
url(r'^api/contact/volunteer/(?P<application_id>[0-9]+)/$', views.contact_project_volunteer, name='contact_project_volunteer'),
88-
url(r'^api/contact/group/(?P<group_id>[0-9]+)/$', views.contact_group_owner, name='contact_group_owner'),
8989
url(r'^volunteer/(?P<project_id>[0-9]+)/$', views.volunteer_with_project, name='volunteer_with_project'),
9090
url(r'^volunteer/leave/(?P<project_id>[0-9]+)/$', views.leave_project, name='leave_project'),
9191
url(r'^volunteer/approve/(?P<application_id>[0-9]+)/$', views.accept_project_volunteer, name='accept_project_volunteer'),

common/components/common/groups/ContactGroupButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class ContactGroupButton extends React.PureComponent<Props, State> {
8181
closeModal: Function
8282
): void {
8383
ProjectAPIUtils.post(
84-
"/api/contact/group/" + this.props.group.group_id + "/",
84+
"/contact/group/" + this.props.group.group_id + "/",
8585
fields,
8686
response => closeModal(),
8787
response => null /* TODO: Report error to user */

common/components/common/projects/ContactProjectButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class ContactProjectButton extends React.PureComponent<Props, State> {
8787
closeModal: Function
8888
): void {
8989
ProjectAPIUtils.post(
90-
"/api/contact/project/" + this.props.project.project_id + "/",
90+
"/contact/project/" + this.props.project.project_id + "/",
9191
fields,
9292
response => closeModal(),
9393
response => null /* TODO: Report error to user */

common/components/common/projects/ContactVolunteersButton.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ContactVolunteersButton extends React.PureComponent<Props, State> {
4343
_handleSubmission(fields, closeModal): ?React$Node {
4444
// TODO: Get close modal working
4545
ProjectAPIUtils.post(
46-
"/api/contact/volunteers/" + this.props.project.project_id + "/",
46+
"/contact/volunteers/" + this.props.project.project_id + "/",
4747
fields,
4848
closeModal, //Send function to close modal
4949
response => null /* TODO: Report error to user */

common/components/common/volunteers/VolunteerSection.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class VolunteerSection extends React.PureComponent<Props, State> {
227227

228228
handleVolunteerContactModal(formFields, closeModal): void {
229229
ProjectAPIUtils.post(
230-
"/api/contact/volunteer/" +
230+
"/contact/volunteer/" +
231231
this.state.volunteerToActUpon.application_id +
232232
"/",
233233
formFields,

0 commit comments

Comments
 (0)