mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +00:00
style: apply prettier across the tree
One-shot prettier pass so the new format:check gate starts from a clean baseline. Formatting only — no behaviour change. Generator-owned and vendored artifacts stay untouched via .prettierignore.
This commit is contained in:
1 parent
b3fea2ef59
commit
1f4ba5939d
1000 files changed
+12130
-8385
No files matched your search
@@ -44,7 +44,11 @@ export const PATCH = apiHandler(
|
||||
onsetAt: true,
|
||||
},
|
||||
});
|
||||
if (!existing || existing.userId !== user.id || existing.deletedAt !== null) {
|
||||
if (
|
||||
!existing ||
|
||||
existing.userId !== user.id ||
|
||||
existing.deletedAt !== null
|
||||
) {
|
||||
return apiError("Episode not found", 404);
|
||||
}
|
||||
if (existing.lifecycle === "CHRONIC_ONGOING") {
|
||||
|
||||
@@ -75,10 +75,9 @@ function liveRow(overrides: Record<string, unknown> = {}) {
|
||||
}
|
||||
|
||||
function req(): NextRequest {
|
||||
return new NextRequest(
|
||||
"http://localhost/api/illness/episodes/ep-1/restore",
|
||||
{ method: "POST" },
|
||||
);
|
||||
return new NextRequest("http://localhost/api/illness/episodes/ep-1/restore", {
|
||||
method: "POST",
|
||||
});
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
|
||||
@@ -71,7 +71,11 @@ export const PATCH = apiHandler(
|
||||
resolvedAt: true,
|
||||
},
|
||||
});
|
||||
if (!existing || existing.userId !== user.id || existing.deletedAt !== null) {
|
||||
if (
|
||||
!existing ||
|
||||
existing.userId !== user.id ||
|
||||
existing.deletedAt !== null
|
||||
) {
|
||||
return apiError("Episode not found", 404);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ export const GET = apiHandler(async (request: NextRequest) => {
|
||||
if (!gate.enabled) return gate.response;
|
||||
|
||||
const parsed = illnessInsightsQuerySchema.safeParse({
|
||||
windowDays: new URL(request.url).searchParams.get("windowDays") ?? undefined,
|
||||
windowDays:
|
||||
new URL(request.url).searchParams.get("windowDays") ?? undefined,
|
||||
});
|
||||
if (!parsed.success) {
|
||||
return returnAllZodIssues(parsed.error, 422, {
|
||||
@@ -79,7 +80,12 @@ export const GET = apiHandler(async (request: NextRequest) => {
|
||||
limit(async (): Promise<[string, number | null]> => {
|
||||
const derived = await computeEpisodeCorrelation(
|
||||
user.id,
|
||||
{ id: r.id, onsetAt: r.onsetAt, resolvedAt: r.resolvedAt, lifecycle: r.lifecycle },
|
||||
{
|
||||
id: r.id,
|
||||
onsetAt: r.onsetAt,
|
||||
resolvedAt: r.resolvedAt,
|
||||
lifecycle: r.lifecycle,
|
||||
},
|
||||
tz,
|
||||
now,
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user