post.api.ts 232 Bytes
Newer Older
1
2
import axios from "axios";
import baseUrl from "./baseUrl";
Lee Soobeom's avatar
Lee Soobeom committed
3
import { PostType } from "../types";
4

Lee Soobeom's avatar
Lee Soobeom committed
5
export const posting = async (post: PostType) => {
6
  const { data } = await axios.post(`${baseUrl}/posts/`, post);
Lee Soobeom's avatar
Lee Soobeom committed
7

8
9
  return data;
};