One Calendar is a privacy-first calendar web app built with Next.js. It has modern security features, including e2ee, password-protected sharing, and self-destructing share links ๐Ÿ“… calendar.xyehr.cn
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #178 from EvanTechDev/dev

Comment out ATProto handlers and redirect root endpoints

authored by

Evan Huang and committed by
GitHub
fe0668b0 c6a7815b

+58 -3
+9
app/api/atproto/callback/route.ts
··· 1 + import { NextRequest, NextResponse } from "next/server"; 2 + 3 + export async function GET(request: NextRequest) { 4 + return NextResponse.redirect(new URL("/", request.url)); 5 + } 6 + 7 + /* 1 8 import { NextRequest, NextResponse } from "next/server"; 2 9 import { ATPROTO_DISABLED } from "@/lib/atproto-feature"; 3 10 import { getActorProfileRecord, getProfile, profileAvatarBlobUrl } from "@/lib/atproto"; ··· 160 167 161 168 return response; 162 169 } 170 + 171 + */
+9
app/api/atproto/login/route.ts
··· 1 + import { NextRequest, NextResponse } from "next/server"; 2 + 3 + export async function POST(request: NextRequest) { 4 + return NextResponse.redirect(new URL("/", request.url)); 5 + } 6 + 7 + /* 1 8 import { randomUUID } from "node:crypto"; 2 9 import { NextRequest, NextResponse } from "next/server"; 3 10 import { ATPROTO_DISABLED, atprotoDisabledResponse } from "@/lib/atproto-feature"; ··· 118 125 119 126 return response; 120 127 } 128 + 129 + */
+9
app/api/atproto/logout/route.ts
··· 1 + import { NextRequest, NextResponse } from "next/server"; 2 + 3 + export async function POST(request: NextRequest) { 4 + return NextResponse.redirect(new URL("/", request.url)); 5 + } 6 + 7 + /* 1 8 import { NextResponse } from "next/server"; 2 9 import { clearAtprotoSession } from "@/lib/atproto-auth"; 3 10 ··· 5 12 await clearAtprotoSession(); 6 13 return NextResponse.json({ success: true }); 7 14 } 15 + 16 + */
+9
app/api/atproto/register-url/route.ts
··· 1 + import { NextRequest, NextResponse } from "next/server"; 2 + 3 + export async function POST(request: NextRequest) { 4 + return NextResponse.redirect(new URL("/", request.url)); 5 + } 6 + 7 + /* 1 8 import { randomUUID } from "node:crypto"; 2 9 import { NextRequest, NextResponse } from "next/server"; 3 10 import { ATPROTO_DISABLED, atprotoDisabledResponse } from "@/lib/atproto-feature"; ··· 73 80 74 81 return response; 75 82 } 83 + 84 + */
+9
app/api/atproto/session/route.ts
··· 1 + import { NextRequest, NextResponse } from "next/server"; 2 + 3 + export async function GET(request: NextRequest) { 4 + return NextResponse.redirect(new URL("/", request.url)); 5 + } 6 + 7 + /* 1 8 import { NextResponse } from "next/server"; 2 9 import { ATPROTO_DISABLED, atprotoDisabledResponse } from "@/lib/atproto-feature"; 3 10 import { getActorProfileRecord, profileAvatarBlobUrl } from "@/lib/atproto"; ··· 43 50 avatar, 44 51 }); 45 52 } 53 + 54 + */
+10
lib/atproto-feature.ts
··· 1 + import { NextResponse } from "next/server"; 2 + 3 + export const ATPROTO_DISABLED = false; 4 + 5 + export function atprotoDisabledResponse() { 6 + return NextResponse.json({ error: "ATProto channel is disabled" }, { status: 410 }); 7 + } 8 + 9 + /* 1 10 import { NextResponse } from "next/server"; 2 11 3 12 export const ATPROTO_DISABLED = true; ··· 5 14 export function atprotoDisabledResponse() { 6 15 return NextResponse.json({ error: "ATProto channel is disabled" }, { status: 410 }); 7 16 } 17 + */
+3 -3
package.json
··· 2 2 "name": "one-calendar", 3 3 "version": "2.2.6", 4 4 "private": true, 5 - "packageManager": "bun@1.3.6", 5 + "packageManager": "bun@1.3.8", 6 6 "scripts": { 7 - "dev": "bun run generate:locales && bun run generate:oauth-metadata && next dev", 8 - "build": "bun run generate:locales && bun run generate:oauth-metadata && next build", 7 + "dev": "bun run generate:locales && next dev", 8 + "build": "bun run generate:locales && next build", 9 9 "start": "next start", 10 10 "db": "docker-compose up -d", 11 11 "db:down": "docker-compose down",