232 const handleEventSubmission = async (newEvent) => {
233 try {
234 const response = await fetch('/submit-event', {
235 method: 'POST',
236 headers: {
253 const handleFeedback = async (feedback) => {
254 try {
255 const response = await fetch('/submit-feedback', {
256 method: 'POST',
257 headers: {
7 let html: string;
8 if (url) {
9 // Fetch the webpage
10 const response = await fetch(url, {
11 headers: {
12 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
80
81async function getWallabagToken(config: any) {
82 const response = await fetch(`${config.WALLABAG_URL}/oauth/v2/token`, {
83 method: "POST",
84 headers: {
99
100async function saveToWallabag(url: string, token: string, config: any) {
101 const response = await fetch(`${config.WALLABAG_URL}/api/entries.json`, {
102 method: "POST",
103 headers: {
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
45 formData.append('previousStory', JSON.stringify(storyParts.parts));
46
47 const response = await fetch('/generate-story', {
48 method: 'POST',
49 body: formData
45 formData.append('previousStory', JSON.stringify(storyParts.parts));
46
47 const response = await fetch('/generate-story', {
48 method: 'POST',
49 body: formData
13
14 useEffect(() => {
15 fetch("/likes")
16 .then(async (res) => await res.json() as Like)
17 .then(data => setLikes(data.likes));
22 confetti();
23 setLikes((prev) => prev + 1);
24 fetch("/like", { method: "POST" }).catch(console.error);
25 });
26 };
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({
182
183 try {
184 const response = await fetch("/", {
185 method: "POST",
186 body: JSON.stringify({