include credentials on fetch calls

This commit is contained in:
Yisroel Baum 2026-04-24 13:30:54 +03:00
parent 4e039fb583
commit c649dbbcc2
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
3 changed files with 11 additions and 4 deletions

View file

@ -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 =>