@@ -9,7 +9,7 @@ const WhitebookUpdateModal = ({ trigger, whitebook }) => {
99
1010 const [ title , setTitle ] = useState ( whitebook . title ) ;
1111 const [ content , setContent ] = useState ( whitebook . content ) ;
12- const [ showOnlyLogin , setShowOnlyLogin ] = useState ( whitebook . show_only_login ) ;
12+ const [ showOnlyLogin , setShowOnlyLogin ] = useState ( whitebook . showOnlyLogin ) ;
1313 const [ inputType , setInputType ] = useState ( whitebook . link ? 'link' : 'pdf' ) ;
1414 const [ link , setLink ] = useState ( whitebook . link || '' ) ;
1515 const [ uploadedPDFLink , setUploadedPDFLink ] = useState ( null ) ;
@@ -39,18 +39,18 @@ const WhitebookUpdateModal = ({ trigger, whitebook }) => {
3939 const formData = new FormData ( ) ;
4040 formData . append ( 'title' , title ) ;
4141 formData . append ( 'content' , content ) ;
42- formData . append ( 'show_only_login ' , showOnlyLogin ) ;
42+ formData . append ( 'showOnlyLogin ' , showOnlyLogin ) ;
4343
4444 if ( inputType === 'link' && link ) {
4545 formData . append ( 'link' , link ) ;
4646 } else if ( inputType === 'pdf' && pdfFile ) {
47- formData . append ( 'pdf_file ' , pdfFile ) ;
47+ formData . append ( 'pdfFile ' , pdfFile ) ;
4848 } else {
4949 // title, content, show_only_login 중 하나라도 변경되었다면 수정 가능
5050 if (
5151 title !== whitebook . title ||
52- content !== whitebook . cotent ||
53- showOnlyLogin !== whitebook . show_only_login
52+ content !== whitebook . content ||
53+ showOnlyLogin !== whitebook . showOnlyLogin
5454 ) {
5555 const link = inputType === 'link' ? link : uploadedPDFLink ;
5656 formData . append ( 'link' , link ) ;
0 commit comments