Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
## Mission Focus

- Until the 1% Treaty passes, optimize for the International Campaign to End War and Disease at `warondisease.org`.
- Legal nonprofit: Accelerated Medicine Foundation. Registered DBAs include Institute for Accelerated Medicine and International Campaign to End War and Disease.
- The default product question is: does this help a human vote, recruit two more humans, get an organization to join, register a plaintiff, pressure a leader, or trust the quantified case enough to act?
- Treat `optimitron.com` as the operating system and proof engine behind the campaign: task coordination, referrals, communications, OPG/OBG/Wishocracy, politician grading, impact math, and AI-agent workflows. Do not let the broader platform compete with the campaign for attention during this phase.
- Park generic platform features, clever demos, cosmetic cleanup, and non-campaign variant work unless they directly reduce campaign friction or protect an already-shipping path.
Expand Down
183 changes: 180 additions & 3 deletions packages/data/src/parameters/parameters-calculations-citations.ts

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions packages/web/src/app/api/dating/blocks/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { DatingBlockScope } from "@optimitron/db";
import { NextResponse } from "next/server";
import { z } from "zod";
import { requireAuth } from "@/lib/auth-utils";
import { createDatingBlock } from "@/lib/dating.server";

export const runtime = "nodejs";

const BlockBodySchema = z.object({
blockedProfileId: z.string().min(1).max(120),
reason: z.string().max(500).nullish(),
scope: z.nativeEnum(DatingBlockScope).optional(),
});

export async function POST(request: Request) {
try {
const { userId } = await requireAuth();
const parsed = BlockBodySchema.parse(await request.json());
const block = await createDatingBlock(userId, parsed);
return NextResponse.json({ block, success: true });
} catch (error) {
if (error instanceof Error && error.message === "Unauthorized") {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
if (error instanceof z.ZodError) {
return NextResponse.json(
{ error: "Invalid dating block." },
{ status: 400 },
);
}
if (error instanceof Error) {
return NextResponse.json({ error: error.message }, { status: 400 });
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
console.error("[dating] Failed to block profile:", error);
return NextResponse.json(
{ error: "Failed to block dating profile." },
{ status: 500 },
);
}
}
1 change: 1 addition & 0 deletions packages/web/src/app/api/dating/profile/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const ProfileBodySchema = z.object({
headline: z.string().max(140).nullish(),
lookingForText: z.string().max(1000).nullish(),
relationshipIntents: z.array(z.nativeEnum(DatingRelationshipIntent)).max(8).optional(),
safetyAcknowledged: z.boolean().optional(),
status: z.nativeEnum(DatingProfileStatus).optional(),
wantsCampaignDates: z.boolean().optional(),
});
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/app/foundations/page.logged-out.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
#### UNIT BREAKDOWN
- No unit pledges yet.
- [SIGN IN AS YOUR ORGANIZATION TO PLEDGE](/auth/signin?callbackUrl=%2Ffoundations)
- Want to coordinate with another human? Go on an [Earth Optimization Date](/love).
- Want to coordinate with another human? Go on an [Earth Optimization Mission](/missions).
4 changes: 2 additions & 2 deletions packages/web/src/app/foundations/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,9 @@ export default async function FoundationsPage() {
Want to coordinate with another human? Go on an{" "}
<Link
className="underline decoration-dotted underline-offset-4"
href={ROUTES.love}
href={ROUTES.missions}
>
Earth Optimization Date
Earth Optimization Mission
</Link>
.
</p>
Expand Down
18 changes: 0 additions & 18 deletions packages/web/src/app/love/dating/page.logged-out.md

This file was deleted.

Loading
Loading