mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
Create fake auth middleware
Work in progress
This commit is contained in:
1 parent
04edfdd0dc
commit
da4b1b18a4
5 files changed
+25
-3
No files matched your search
@@ -12,9 +12,11 @@ export async function getSessionList(req, res) {
|
||||
export async function createSession(req, res) {
|
||||
const newSession = new Session({
|
||||
user: req.user.id,
|
||||
exercise: req.body.exercise_id,
|
||||
exercise: req.body.quest_id,
|
||||
})
|
||||
|
||||
console.log(newSession)
|
||||
|
||||
try {
|
||||
const session = await newSession.save()
|
||||
res.status(201).json(session)
|
||||
|
||||
Reference in new issue
Block a user