Skip to content

Commit

Permalink
Merge pull request #149 from ComputerScienceHouse/develop
Browse files Browse the repository at this point in the history
Pass cookies through newYear requests
  • Loading branch information
mbillow authored Jul 28, 2017
2 parents e375f4e + 270cd82 commit fdd8223
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/javascript/modules/newYear.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export default class NewYear {
warningText: "This will clear active members and room assignments!",
successText: "Data successfully cleared."}, () => {
fetch(this.endpoints.housing, {
method: 'DELETE'
method: 'DELETE',
credentials: "same-origin"
})
.then($('#new-clear').fadeOut(() => {
$("#new-current").fadeIn();
Expand All @@ -45,7 +46,8 @@ export default class NewYear {
} else if (this.uid) {
if ($('#rem-' + this.uid).is(":visible")) {
fetch(this.endpoints.current + this.uid, {
method: 'DELETE'
method: 'DELETE',
credentials: "same-origin"
}).then(() => {
$('#rem-' + this.uid).hide();
$('#add-' + this.uid).show();
Expand All @@ -58,7 +60,8 @@ export default class NewYear {
});
} else {
fetch(this.endpoints.current + this.uid, {
method: 'POST'
method: 'POST',
credentials: "same-origin"
}).then(() => {
$('#add-' + this.uid).hide();
$('#rem-' + this.uid).show();
Expand Down

0 comments on commit fdd8223

Please sign in to comment.