you
@you
Reviews Written
10
Average Rating
5.0
Posts
Q&A
m1 ๋งฅ ์ฌ์ฉ์๋ถ๋ค ์ค์ gradle๋ก ์์ฑ์ค์ธ ๋ถ๋ค ์ํด ๋จ๊น๋๋ค.
๊ฐ์ฌํฉ๋๋ค!!
- 1
- 2
- 573
Q&A
ํ๋๋ง ๋ ์ง๋ฌธ๋๋ฆด๊ฒ์!
๊ฐ์ฌํฉ๋๋คใ ใ ๋ต๋ณ ๋ฌ์์ฃผ์ ๊ฑฐ ๋ณด๊ณ ํด๊ฒฐํ์ต๋๋ค. ( ์ฑ ๋ชจ๋ฌ์ฐฝ์ผ๋ก ํ๋ฒ์ ํ๋์ 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
- 233




