post.db.ts 320 Bytes
Newer Older
Lee Soobeom's avatar
Lee Soobeom committed
1
2
3
4
5
6
7
8
9
10
11
12
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;
};