mirror of
https://github.com/bitbaum/vitareba.git
synced 2026-12-04 05:37:46 +01:00
* chore: add a formatter, matching the style this repo already writes singleQuote=false was chosen by counting this repo's own imports, not by fleet decree. The fleet is genuinely split and the two repos that already had a .prettierrc disagreed with each other, so there was no standard to restore. Quote style does not cross repo boundaries; having a gate does. Markdown is ignored for now — prettier rewraps prose, which would bury the real diff. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * style: format with prettier (304 files) Mechanical. No behaviour change. This SHA is listed in .git-blame-ignore-revs so `git blame` skips it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * chore: teach git blame to skip the reformat Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * style: format the two files the reformat pass missed prettier --check flagged app/shared.module.css and lib/domain/clinicians.test.ts on a branch whose whole point was that everything had been formatted. Re-running the same command with the same version fixes both, so the rollout's write step did not finish what it reported. The rollout now runs --check straight after --write and refuses to open a PR unless it comes back clean, so a partial reformat fails at the source instead of in CI. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
15 lines
527 B
TypeScript
15 lines
527 B
TypeScript
import { NextResponse } from "next/server";
|
|
|
|
/** Standard 500 response for DB-read failures at the top of a route handler. */
|
|
export function serviceUnavailable(): NextResponse {
|
|
return NextResponse.json(
|
|
{ success: false, error: "Service unavailable — please try again" },
|
|
{ status: 500 },
|
|
);
|
|
}
|
|
|
|
/** Standard 400 response for invalid route params or request bodies. */
|
|
export function badRequest(message: string): NextResponse {
|
|
return NextResponse.json({ success: false, error: message }, { status: 400 });
|
|
}
|