diff options
author | LarsVomMars | 2021-02-06 14:34:49 +0100 |
---|---|---|
committer | LarsVomMars | 2021-02-06 14:34:49 +0100 |
commit | 3db332b82530784501389bd3f8d1b8e800241a3a (patch) | |
tree | 7f6ebd9ff102f7f77163452f947bc87854a5ec36 /admin/index.js | |
parent | 436e6c371571ca57403e31ec662d596f4f2aa90c (diff) |
Wow! So cool! Amazing!
Diffstat (limited to 'admin/index.js')
-rw-r--r-- | admin/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/admin/index.js b/admin/index.js index 7479a3e..37e5914 100644 --- a/admin/index.js +++ b/admin/index.js @@ -76,7 +76,7 @@ app.get("/api/participation", checkAdmin, async (req, res) => { app.get("/api/prediction", checkAdmin, async (req, res) => { const prediction = await db.query( - "SELECT u.name uname, u.middlename umid, u.surname usur, t.name tname, t.middlename tmid, t.surname tsur FROM users u INNER JOIN teacher_prediction p ON u.id = p.user_id INNER JOIN users t ON t.id = p.teacher_id", + "SELECT u.name uname, u.middlename umid, u.surname usur, t.id tid, t.name tname, t.surname tsur, c.name class FROM users u INNER JOIN teacher_prediction p ON u.id = p.user_id INNER JOIN users t ON t.id = p.teacher_id INNER JOIN class c ON c.id = u.class_id", ); res.json(prediction); }); |