Skip to content

Commit fdd8223

Browse files
authored
Merge pull request #149 from ComputerScienceHouse/develop
Pass cookies through newYear requests
2 parents e375f4e + 270cd82 commit fdd8223

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

frontend/javascript/modules/newYear.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ export default class NewYear {
3131
warningText: "This will clear active members and room assignments!",
3232
successText: "Data successfully cleared."}, () => {
3333
fetch(this.endpoints.housing, {
34-
method: 'DELETE'
34+
method: 'DELETE',
35+
credentials: "same-origin"
3536
})
3637
.then($('#new-clear').fadeOut(() => {
3738
$("#new-current").fadeIn();
@@ -45,7 +46,8 @@ export default class NewYear {
4546
} else if (this.uid) {
4647
if ($('#rem-' + this.uid).is(":visible")) {
4748
fetch(this.endpoints.current + this.uid, {
48-
method: 'DELETE'
49+
method: 'DELETE',
50+
credentials: "same-origin"
4951
}).then(() => {
5052
$('#rem-' + this.uid).hide();
5153
$('#add-' + this.uid).show();
@@ -58,7 +60,8 @@ export default class NewYear {
5860
});
5961
} else {
6062
fetch(this.endpoints.current + this.uid, {
61-
method: 'POST'
63+
method: 'POST',
64+
credentials: "same-origin"
6265
}).then(() => {
6366
$('#add-' + this.uid).hide();
6467
$('#rem-' + this.uid).show();

0 commit comments

Comments
 (0)