Download src/app/api/auth/reset-password/route.js from heyeyydss/api9nin: direct link, hf CLI and curl.
- Browser
- Download file 473 Bytes
-
https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/app/api/auth/reset-password/route.js
- Command line
-
hf download hf://spaces/heyeyydss/api9nin/src/app/api/auth/reset-password/route.js
-
curl -L -o route.js https://huggingface.co/spaces/heyeyydss/api9nin/resolve/main/src/app/api/auth/reset-password/route.js
473 Bytes
| import { NextResponse } from "next/server"; | |
| import { updateSettings } from "@/lib/localDb"; | |
| // Reset dashboard password to default by clearing the stored hash. | |
| // Local-only (enforced by dashboardGuard). Never returns the default literal. | |
| export async function POST() { | |
| try { | |
| await updateSettings({ password: null }); | |
| return NextResponse.json({ success: true }); | |
| } catch (error) { | |
| return NextResponse.json({ error: error.message }, { status: 500 }); | |
| } | |
| } | |