Reviewed-on: #1 Co-authored-by: obvTiger <obvtiger@epilogue.team> Co-committed-by: obvTiger <obvtiger@epilogue.team>
23 lines
No EOL
485 B
JavaScript
23 lines
No EOL
485 B
JavaScript
module.exports = (app, prisma) => {
|
|
app.get("/", async (req, res) => {
|
|
try {
|
|
const data = req.body;
|
|
|
|
// input valiation
|
|
|
|
// business logic
|
|
|
|
// output validation
|
|
|
|
// output
|
|
const response = {
|
|
|
|
};
|
|
|
|
res.json({ response });
|
|
} catch (error) {
|
|
console.log('Error:', error);
|
|
res.status(500).json({ error: 'Internal server error' });
|
|
}
|
|
});
|
|
} |