import { Posting, PostingType } from "../models"; export const createPosting = async (posting: PostingType) => { const newPosting = await Posting.create({ title: posting.title, text: posting.text, theme: posting.theme, city: posting.city, username: posting.username, }); return newPosting; };