1st push
This commit is contained in:
parent
501d8a8d8e
commit
3226975910
76 changed files with 48623 additions and 3401 deletions
16
api/route.js
Normal file
16
api/route.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// export const dynamic = 'force-dynamic' // defaults to auto
|
||||
// export async function GET(request) {}
|
||||
export default async function handler(req, res) {
|
||||
const session = await getSession(req)
|
||||
|
||||
// Check if the user is authenticated
|
||||
if (!session) {
|
||||
res.status(401).json({
|
||||
error: "User is not authenticated",
|
||||
})
|
||||
return
|
||||
}
|
||||
console.log("_____________________________________________")
|
||||
// Proceed with the route for authorized users
|
||||
// ... implementation of the API Route
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue