MCPcopy Create free account
hub / github.com/WebDevSimplified/course-platform / getTotalLessons

Function getTotalLessons

src/app/admin/page.tsx:155–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153}
154
155async function getTotalLessons() {
156 "use cache"
157 cacheTag(getLessonGlobalTag())
158
159 const [data] = await db
160 .select({ totalLessons: count(LessonTable.id) })
161 .from(LessonTable)
162 if (data == null) return 0
163 return data.totalLessons
164}
165
166async function getTotalCourseSections() {
167 "use cache"

Callers 1

AdminPageFunction · 0.85

Calls 1

getLessonGlobalTagFunction · 0.90

Tested by

no test coverage detected