mirror of
https://github.com/YuzuZensai/Pien-Studio.git
synced 2026-09-02 14:18:35 +00:00
♻️ refactor!: massive refactor
This commit is contained in:
@@ -5,11 +5,15 @@ export const dynamic = "force-dynamic";
|
||||
|
||||
export function GET() {
|
||||
if (process.env.NODE_ENV !== "development") {
|
||||
return NextResponse.json({ hash: process.env.NEXT_PUBLIC_GIT_HASH || "unknown" });
|
||||
return NextResponse.json({
|
||||
hash: process.env.NEXT_PUBLIC_GIT_HASH || "unknown",
|
||||
});
|
||||
}
|
||||
|
||||
try {
|
||||
const hash = execSync("git rev-parse --short HEAD", { cwd: process.cwd() }).toString().trim();
|
||||
const hash = execSync("git rev-parse --short HEAD", { cwd: process.cwd() })
|
||||
.toString()
|
||||
.trim();
|
||||
return NextResponse.json({ hash });
|
||||
} catch {
|
||||
return NextResponse.json({ hash: "unknown" });
|
||||
|
||||
Reference in New Issue
Block a user