fix(v1.10.1): force dynamic for problematic APIs and improve Outlook sync logs

This commit is contained in:
mARTin 2026-03-02 08:26:14 +01:00
parent 330d6fddc6
commit beb3281194
6 changed files with 12 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "my-weekly-todo-list", "name": "my-weekly-todo-list",
"version": "1.10.0", "version": "1.10.1",
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view", "description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View File

@ -4,6 +4,8 @@ import { authOptions } from "@/lib/auth";
import { prisma } from '@/lib/prisma'; import { prisma } from '@/lib/prisma';
import { getTokens, getUserCalendars } from '@/lib/outlook-calendar'; import { getTokens, getUserCalendars } from '@/lib/outlook-calendar';
export const dynamic = 'force-dynamic';
export async function GET(request: NextRequest) { export async function GET(request: NextRequest) {
const baseUrl = process.env.NEXTAUTH_URL || request.url; const baseUrl = process.env.NEXTAUTH_URL || request.url;

View File

@ -3,6 +3,8 @@ import { getServerSession } from 'next-auth';
import { authOptions } from "@/lib/auth"; import { authOptions } from "@/lib/auth";
import { getAuthUrl } from '@/lib/outlook-calendar'; import { getAuthUrl } from '@/lib/outlook-calendar';
export const dynamic = 'force-dynamic';
export async function GET(request: NextRequest) { export async function GET(request: NextRequest) {
try { try {
const session = await getServerSession(authOptions); const session = await getServerSession(authOptions);

View File

@ -4,6 +4,8 @@ import { authOptions } from '@/lib/auth';
import { prisma } from '@/lib/prisma'; import { prisma } from '@/lib/prisma';
import { getHolidayHint } from '@/lib/holidays'; import { getHolidayHint } from '@/lib/holidays';
export const dynamic = 'force-dynamic';
export async function GET(req: Request) { export async function GET(req: Request) {
try { try {
const session = await getServerSession(authOptions); const session = await getServerSession(authOptions);

View File

@ -6,6 +6,8 @@ import { createGoogleClient, fetchGoogleTaskLists } from '@/lib/google-tasks';
import { fetchMsTodoLists } from '@/lib/microsoft-todo'; import { fetchMsTodoLists } from '@/lib/microsoft-todo';
import { getOutlookAccessToken } from '@/lib/outlook-token'; import { getOutlookAccessToken } from '@/lib/outlook-token';
export const dynamic = 'force-dynamic';
const prisma = new PrismaClient(); const prisma = new PrismaClient();
export async function GET(req: NextRequest) { export async function GET(req: NextRequest) {

View File

@ -163,7 +163,9 @@ export const getUpcomingEvents = async (
); );
if (!response.ok) { if (!response.ok) {
throw new Error(`Failed to fetch events: ${response.statusText}`); const errorText = await response.text();
console.error(`[OUTLOOK] Failed to fetch events for calendar ${calendarId}:`, response.status, response.statusText, errorText);
throw new Error(`Failed to fetch events: ${response.status} ${response.statusText}`);
} }
const data = await response.json(); const data = await response.json();