Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions convex/_generated/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type * as env from "../env.js";
import type * as fileStorage from "../fileStorage.js";
import type * as learningPlanAi from "../learningPlanAi.js";
import type * as learningPlans from "../learningPlans.js";
import type * as learningTimes from "../learningTimes.js";
import type * as scheduleConflicts from "../scheduleConflicts.js";
import type * as users from "../users.js";

Expand All @@ -30,6 +31,7 @@ declare const fullApi: ApiFromModules<{
fileStorage: typeof fileStorage;
learningPlanAi: typeof learningPlanAi;
learningPlans: typeof learningPlans;
learningTimes: typeof learningTimes;
scheduleConflicts: typeof scheduleConflicts;
users: typeof users;
}>;
Expand Down
8 changes: 7 additions & 1 deletion convex/dayEntries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ export const listByDayKeys = query({
plan = await ctx.db.get("learningPlans", session.learningPlanId);
planCache.set(session.learningPlanId, plan);
}
if (!plan || plan.ownerTokenIdentifier !== ownerTokenIdentifier) continue;
if (
!plan ||
plan.ownerTokenIdentifier !== ownerTokenIdentifier ||
plan.status !== "accepted"
) {
continue;
}

grouped[requestedDayKey] = [
...(grouped[requestedDayKey] ?? []),
Expand Down
Loading