computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
510 B
21 lines
510 B
10 months ago
|
import { type APIContext } from 'astro';
|
||
|
import { api } from './api.ts';
|
||
|
|
||
|
export type GetAIRoadmapBySlugResponse = {
|
||
|
id: string;
|
||
|
term: string;
|
||
|
title: string;
|
||
|
data: string;
|
||
|
isAuthenticatedUser: boolean;
|
||
|
};
|
||
|
|
||
|
export function aiRoadmapApi(context: APIContext) {
|
||
|
return {
|
||
|
getAIRoadmapBySlug: async function (roadmapSlug: string) {
|
||
|
return api(context).get<GetAIRoadmapBySlugResponse>(
|
||
|
`${import.meta.env.PUBLIC_API_URL}/v1-get-ai-roadmap-by-slug/${roadmapSlug}`,
|
||
|
);
|
||
|
},
|
||
|
};
|
||
|
}
|