post.api.ts 237 Bytes
Newer Older
1
2
3
4
5
6
7
8
import axios from "axios";
import baseUrl from "./baseUrl";
import { PostingType } from "../types";

export const posting = async (post: PostingType) => {
  const { data } = await axios.post(`${baseUrl}/posts/`, post);
  return data;
};