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

Function getTotalCourseSections

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

Source from the content-addressed store, hash-verified

164}
165
166async function getTotalCourseSections() {
167 "use cache"
168 cacheTag(getCourseSectionGlobalTag())
169
170 const [data] = await db
171 .select({ totalCourseSections: count(CourseSectionTable.id) })
172 .from(CourseSectionTable)
173 if (data == null) return 0
174 return data.totalCourseSections
175}

Callers 1

AdminPageFunction · 0.85

Calls 1

Tested by

no test coverage detected