Seokjin

[UPDATE]Umbrella

...@@ -56,7 +56,9 @@ app.post('/api/clothes', (req, res) => { ...@@ -56,7 +56,9 @@ app.post('/api/clothes', (req, res) => {
56 let randb=Math.floor(Math.random()*clothes.bottom.length); 56 let randb=Math.floor(Math.random()*clothes.bottom.length);
57 if (err) return res.status(500).json({ MatchingSuccess: false }); 57 if (err) return res.status(500).json({ MatchingSuccess: false });
58 else if (clothes) { 58 else if (clothes) {
59 - return res.status(200).json({top:"../../../../src/img/"+ clothes.top[randt]+".jpg",bottom:"../../../../src/img/"+ clothes.bottom[randb]+".jpg"}); 59 + if(req.body.rain==1) return res.status(200).json({top:"../../../../src/img/"+ clothes.top[randt]+".jpg",bottom:"../../../../src/img/"+ clothes.bottom[randb]+".jpg",umbrella:1})
60 + else return res.status(200).json({top:"../../../../src/img/"+ clothes.top[randt]+".jpg",bottom:"../../../../src/img/"+ clothes.bottom[randb]+".jpg",umbrella:0});
61 +
60 } 62 }
61 else return res.status(404).json({ MatchingSuccess: false }); 63 else return res.status(404).json({ MatchingSuccess: false });
62 }); 64 });
......