mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: update course metadata revalidation to 0 for improved performance
This commit is contained in:
parent
cc1894cd9c
commit
e777597d89
3 changed files with 5 additions and 5 deletions
|
|
@ -24,7 +24,7 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
|
||||||
// Get Org context information
|
// Get Org context information
|
||||||
const course_meta = await getCourseMetadata(
|
const course_meta = await getCourseMetadata(
|
||||||
params.courseid,
|
params.courseid,
|
||||||
{ revalidate: 30, tags: ['courses'] },
|
{ revalidate: 0, tags: ['courses'] },
|
||||||
access_token ? access_token : null
|
access_token ? access_token : null
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ const EditActivity = async (params: any) => {
|
||||||
const courseid = (await params.params).courseid
|
const courseid = (await params.params).courseid
|
||||||
const courseInfo = await getCourseMetadata(
|
const courseInfo = await getCourseMetadata(
|
||||||
courseid,
|
courseid,
|
||||||
{ revalidate: 30, tags: ['courses'] },
|
{ revalidate: 0, tags: ['courses'] },
|
||||||
access_token ? access_token : null
|
access_token ? access_token : null
|
||||||
)
|
)
|
||||||
const activity = await getActivityWithAuthHeader(
|
const activity = await getActivityWithAuthHeader(
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ type Session = {
|
||||||
async function fetchCourseMetadata(courseuuid: string, access_token: string | null | undefined) {
|
async function fetchCourseMetadata(courseuuid: string, access_token: string | null | undefined) {
|
||||||
return await getCourseMetadata(
|
return await getCourseMetadata(
|
||||||
courseuuid,
|
courseuuid,
|
||||||
{ revalidate: 30, tags: ['courses'] },
|
{ revalidate: 0, tags: ['courses'] },
|
||||||
access_token || null
|
access_token || null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ export async function generateMetadata(props: MetadataProps): Promise<Metadata>
|
||||||
})
|
})
|
||||||
const course_meta = await getCourseMetadata(
|
const course_meta = await getCourseMetadata(
|
||||||
params.courseuuid,
|
params.courseuuid,
|
||||||
{ revalidate: 30, tags: ['courses'] },
|
{ revalidate: 0, tags: ['courses'] },
|
||||||
access_token ? access_token : null
|
access_token ? access_token : null
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ const CoursePage = async (params: any) => {
|
||||||
// Fetch course metadata once
|
// Fetch course metadata once
|
||||||
const course_meta = await getCourseMetadata(
|
const course_meta = await getCourseMetadata(
|
||||||
params.params.courseuuid,
|
params.params.courseuuid,
|
||||||
{ revalidate: 30, tags: ['courses'] },
|
{ revalidate: 0, tags: ['courses'] },
|
||||||
access_token ? access_token : null
|
access_token ? access_token : null
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue