|
|
@ -2,10 +2,12 @@ import { getAllBestPractices } from '../lib/best-pratice'; |
|
|
|
import { getAllGuides } from '../lib/guide'; |
|
|
|
import { getAllGuides } from '../lib/guide'; |
|
|
|
import { getRoadmapsByTag } from '../lib/roadmap'; |
|
|
|
import { getRoadmapsByTag } from '../lib/roadmap'; |
|
|
|
import { getAllVideos } from '../lib/video'; |
|
|
|
import { getAllVideos } from '../lib/video'; |
|
|
|
|
|
|
|
import {getAllQuestionGroups} from "../lib/question-group"; |
|
|
|
|
|
|
|
|
|
|
|
export async function GET() { |
|
|
|
export async function GET() { |
|
|
|
const guides = await getAllGuides(); |
|
|
|
const guides = await getAllGuides(); |
|
|
|
const videos = await getAllVideos(); |
|
|
|
const videos = await getAllVideos(); |
|
|
|
|
|
|
|
const questionGroups = await getAllQuestionGroups(); |
|
|
|
const roadmaps = await getRoadmapsByTag('roadmap'); |
|
|
|
const roadmaps = await getRoadmapsByTag('roadmap'); |
|
|
|
const bestPractices = await getAllBestPractices(); |
|
|
|
const bestPractices = await getAllBestPractices(); |
|
|
|
|
|
|
|
|
|
|
@ -26,6 +28,12 @@ export async function GET() { |
|
|
|
title: bestPractice.frontmatter.briefTitle, |
|
|
|
title: bestPractice.frontmatter.briefTitle, |
|
|
|
group: 'Best Practices', |
|
|
|
group: 'Best Practices', |
|
|
|
})), |
|
|
|
})), |
|
|
|
|
|
|
|
...questionGroups.map((questionGroup) => ({ |
|
|
|
|
|
|
|
id: questionGroup.id, |
|
|
|
|
|
|
|
url: `/questions/${questionGroup.id}`, |
|
|
|
|
|
|
|
title: questionGroup.frontmatter.briefTitle, |
|
|
|
|
|
|
|
group: 'Questions', |
|
|
|
|
|
|
|
})), |
|
|
|
...guides.map((guide) => ({ |
|
|
|
...guides.map((guide) => ({ |
|
|
|
id: guide.id, |
|
|
|
id: guide.id, |
|
|
|
url: `/guides/${guide.id}`, |
|
|
|
url: `/guides/${guide.id}`, |
|
|
|