-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #358 from mfts/feat/downloads
feat: add download icon for downloaded documents
- Loading branch information
Showing
4 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import prisma from "@/lib/prisma"; | ||
|
||
export default async function handler( | ||
_req: NextApiRequest, | ||
res: NextApiResponse, | ||
) { | ||
try { | ||
await prisma.$queryRaw`SELECT 1`; | ||
|
||
return res.json({ | ||
status: "ok", | ||
message: "All systems operational", | ||
}); | ||
} catch (err) { | ||
console.error(err); | ||
|
||
return res.status(500).json({ | ||
status: "error", | ||
message: (err as Error).message, | ||
}); | ||
} | ||
} |