import { Post, PostType } from "../models"; export const createPost = async (post: PostType) => { const newPosting = await Post.create({ title: post.title, text: post.text, theme: post.theme, city: post.city, user: post.user, date: post.date, counts: 0, }); return newPosting; };