feat: integrate Bunny Stream course videos
This commit is contained in:
@@ -159,7 +159,7 @@ export const manageCourseRoutes: FastifyPluginAsync = async (app) => {
|
||||
const filters = request.user.role === 'admin'
|
||||
? { sql: "where c.status <> 'archived' order by c.created_at desc", values: [] as string[] }
|
||||
: { sql: "where c.instructor_id = $1 and c.status <> 'archived' order by c.created_at desc", values: [request.user.id] };
|
||||
const result = await pool.query(`${courseSelect()} ${filters.sql}`, filters.values);
|
||||
const result = await pool.query(`${courseSelect(false, true)} ${filters.sql}`, filters.values);
|
||||
return { data: result.rows };
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user