17 lines
534 B
TypeScript
17 lines
534 B
TypeScript
import { client } from "@/shared/api";
|
|
import { AS_DASHBOARD_BBS_ID, ENDPOINT } from "@/shared/config";
|
|
|
|
import { 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/${AS_DASHBOARD_BBS_ID}`,
|
|
{ params },
|
|
);
|
|
return response.data;
|
|
}
|
|
|
|
export const postApi: PostService = {
|
|
getUserPostList,
|
|
};
|