include credentials on fetch calls
This commit is contained in:
parent
4e039fb583
commit
c649dbbcc2
3 changed files with 11 additions and 4 deletions
|
|
@ -3,7 +3,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
const createPlanModal = document.getElementById('create-plan-modal');
|
||||
|
||||
async function loadTexts() {
|
||||
const response = await fetch('/api/texts');
|
||||
const response = await fetch('/api/texts', {
|
||||
credentials: 'same-origin',
|
||||
});
|
||||
const texts = await response.json();
|
||||
textsList.innerHTML = texts
|
||||
.map(text =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue