소개
게시글
질문&답변
2022.02.15
m1 맥 사용자분들 중에 gradle로 작성중인 분들 위해 남김니다.
감사합니다!!
- 1
- 2
- 396
고민있어요
2022.02.12 20:21
git push할 때 나타날 수 있는 permission 에러
- 0
- 0
- 105
질문&답변
2021.09.14
하나만 더 질문드릴게요!
감사합니다ㅎㅎ 답변 달아주신거 보고 해결했습니다. ( 앱 모달창으로 한번에 하나의 item만 수정할 수 있습니다. ) export const ReviseCafeData = async ( params: any ) => { try { const { cafe_id , introduction , beans , phone } = params ; let updateBody: any = {} ; if ( introduction && !beans && !phone ) updateBody = { 'cafe_info.introduction' : introduction } ; else if ( !introduction && beans && !phone ) updateBody = { 'cafe_info.beans' : beans } ; else if ( !introduction && !beans && phone ) updateBody = { 'cafe_info.phone' : phone } ; else console . log ( '데이터가 하나만 등록되어야 함' ) ; // 배포 시 return err 처리 return await CafeModel . findOneAndUpdate ({ cafe_id } , updateBody , { new : true }) ; } catch ( err ) { console . log ( err ) ; return { err } ; } } ;
- 2
- 2
- 128