Skip to content

Commit

Permalink
Merge pull request #38 from primus-teoSprint/feat/#32
Browse files Browse the repository at this point in the history
[#32] ์•„๋ถˆ์‹  ๊ฒ€์ฆ ํˆด ์ƒ์„ฑ api ์—ฐ๊ฒฐ
  • Loading branch information
03hoho03 authored Apr 7, 2024
2 parents 25c2e65 + 529d349 commit 89fc79e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
8 changes: 4 additions & 4 deletions app/(route)/verification/ibulsin/_components/Step3/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ function Step3() {
const { mutate } = useIbulsinFormMutation()

const handleSubmit = () => {
const ideaOverView = outlineValue
const ideaOverview = outlineValue
const thinkBackground = whyTextValue
const marketTheory = marketResponseValue
const bigxyzTheory = XYZValue
const smallxyzTheory = xyzValue
const pretotypingTheory = pretotypingValue
const pretotypePlan = pretotypingValue

const body = {
ideaOverView,
ideaOverview,
thinkBackground,
marketTheory,
bigxyzTheory,
smallxyzTheory,
pretotypingTheory,
pretotypePlan,
}

mutate(body, {
Expand Down
15 changes: 10 additions & 5 deletions app/_service/mutations/useIbulsinForm.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import axiosInstance from '@/app/_utils/axios'
import { useMutation } from '@tanstack/react-query'

interface IbulsinFormBodyType {
ideaOverView: string
interface IbulsinFormDataType {
ideaOverview: string
thinkBackground: string
marketTheory: string
bigxyzTheory: string
smallxyzTheory: string
pretotypingTheory: string
pretotypePlan: string
}

const postForm = (data: IbulsinFormBodyType) => {
const response = axiosInstance.post(`/api/`, data)
const postForm = (data: IbulsinFormDataType) => {
const body = {
...data,
toolName: '์•„์ด๋””์–ด ๋ถˆํŒจ์‹ ํ™”',
}
console.log(body)
const response = axiosInstance.post(`/api/toolTemplates`, body)

return response
}
Expand Down
4 changes: 2 additions & 2 deletions app/_utils/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import axios from 'axios'

const baseURL =
process.env.NODE_ENV === 'production'
? process.env.BASE_URL
: process.env.TEST_BASE_URL
? process.env.NEXT_PUBLIC_BASE_URL
: process.env.NEXT_PUBLIC_TEST_BASE_URL

const axiosInstance = axios.create({
baseURL,
Expand Down

0 comments on commit 89fc79e

Please sign in to comment.