MCPcopy Index your code
hub / github.com/code100x/cms / getAllCourses

Function getAllCourses

src/db/course.ts:31–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31export async function getAllCourses() {
32 const value = await cache.get('getAllCourses', []);
33 if (value) {
34 return value;
35 }
36 const courses = await db.course.findMany({
37 orderBy: {
38 id: 'desc',
39 },
40 });
41 cache.set('getAllCourses', [], courses);
42 return courses;
43}
44
45export async function getAllCoursesAndContentHierarchy(): Promise<
46 {

Callers 1

refreshDbInternalFunction · 0.90

Calls 2

getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected