Skip to content

Commit

Permalink
FIX : 구조분해할당
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubinquitous committed Apr 8, 2023
1 parent 30a9f56 commit b380398
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/api/createPost.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import axios from 'axios'
import getCookie from '@/util/cookie/getCookie'

const createPost = async (category: string, isAnonymous: boolean, contents: string, image: string, imageType: string) => {
interface CreatePostType {
category: string
isAnonymous: boolean
contents: string
image: string
imageType: string
}

const createPost = async ({ category, isAnonymous, contents, image, imageType }: CreatePostType) => {
return (
await axios.post(
'post/create',
Expand Down

0 comments on commit b380398

Please sign in to comment.