mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 05:42:19 +00:00
chore(style): repo-wide prettier sweep before v1.4.6 tag
Long-overdue prettier sweep; prettier had drifted vs. checked-in code across ~130 files (mostly long-argument line-break wrapping in TS and table-padding in markdown). Pure formatting — no semantic changes — and required to clear the v1.4.6 release gate's `pnpm format:check`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
67575180b8
commit
02b99553b9
135 files changed
+2159
-1583
No files matched your search
@@ -34,10 +34,7 @@ export const DELETE = apiHandler(async (request: NextRequest) => {
|
||||
if (user.role === "ADMIN") {
|
||||
const adminCount = await prisma.user.count({ where: { role: "ADMIN" } });
|
||||
if (adminCount <= 1) {
|
||||
return apiError(
|
||||
"The last admin account cannot be deleted",
|
||||
400,
|
||||
);
|
||||
return apiError("The last admin account cannot be deleted", 400);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,7 @@ import { randomBytes } from "node:crypto";
|
||||
import { prisma } from "@/lib/db";
|
||||
import { apiSuccess, apiError } from "@/lib/api-response";
|
||||
import { encrypt } from "@/lib/crypto";
|
||||
import {
|
||||
encryptMoodLogSecret,
|
||||
readMoodLogSecret,
|
||||
} from "@/lib/moodlog-secret";
|
||||
import { encryptMoodLogSecret, readMoodLogSecret } from "@/lib/moodlog-secret";
|
||||
import { moodLogCredentialsSchema } from "@/lib/validations/moodlog";
|
||||
import { apiHandler, requireAuth } from "@/lib/api-handler";
|
||||
import { annotate } from "@/lib/logging/context";
|
||||
|
||||
@@ -38,8 +38,7 @@ export const POST = apiHandler(async () => {
|
||||
eventType: "SYSTEM_ALERT",
|
||||
userId: user.id,
|
||||
title: "HealthLog Test",
|
||||
message:
|
||||
"HealthLog: Connection successful! ntfy notifications are active.",
|
||||
message: "HealthLog: Connection successful! ntfy notifications are active.",
|
||||
});
|
||||
|
||||
if (!success) {
|
||||
|
||||
@@ -91,10 +91,7 @@ export const PUT = apiHandler(async (request: NextRequest) => {
|
||||
try {
|
||||
appBaseUrl = new URL(appUrl);
|
||||
} catch {
|
||||
return apiError(
|
||||
"Server configuration error: APP_URL is invalid.",
|
||||
500,
|
||||
);
|
||||
return apiError("Server configuration error: APP_URL is invalid.", 500);
|
||||
}
|
||||
|
||||
if (appBaseUrl.protocol !== "https:") {
|
||||
|
||||
@@ -23,10 +23,7 @@ export const POST = apiHandler(async () => {
|
||||
});
|
||||
|
||||
if (!dbUser?.telegramBotToken || !dbUser?.telegramChatId) {
|
||||
return apiError(
|
||||
"Bot token and chat ID must be saved first",
|
||||
422,
|
||||
);
|
||||
return apiError("Bot token and chat ID must be saved first", 422);
|
||||
}
|
||||
|
||||
const botToken = decrypt(dbUser.telegramBotToken);
|
||||
@@ -43,7 +40,10 @@ export const POST = apiHandler(async () => {
|
||||
);
|
||||
}
|
||||
|
||||
annotate({ action: { name: "settings.telegram.test" }, meta: { success: true } });
|
||||
annotate({
|
||||
action: { name: "settings.telegram.test" },
|
||||
meta: { success: true },
|
||||
});
|
||||
|
||||
return apiSuccess({ sent: true });
|
||||
});
|
||||
Reference in new issue
Block a user