Files
frontend/apps/st/src/entities/post/api/post-service.ts
T

23 lines
597 B
TypeScript

import { client } from "@/shared/api";
import { ENDPOINT, ST_DASHBOARD_BBS_ID } from "@/shared/config";
import type {
PostService,
UserPostListResponse,
UserPostSearchParams,
} from "../model/post-interface";
async function getUserPostList(
params?: UserPostSearchParams,
): Promise<UserPostListResponse> {
const response = await client.get<UserPostListResponse>(
`${ENDPOINT.BOARD_SERVICE.POSTS}/user/${ST_DASHBOARD_BBS_ID}`,
{ params },
);
return response.data;
}
export const postApi: PostService = {
getUserPostList,
};