Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -56,8 +56,8 @@ app.post('/api/clothes', (req, res) => { | ... | @@ -56,8 +56,8 @@ 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 | - 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}) | 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,top1:clothes.top[randt],bottom1:clothes.bottom[randb]}) |
60 | - else return res.status(200).json({top:"../../../../src/img/"+ clothes.top[randt]+".jpg",bottom:"../../../../src/img/"+ clothes.bottom[randb]+".jpg",umbrella:0}); | 60 | + else return res.status(200).json({top:"../../../../src/img/"+ clothes.top[randt]+".jpg",bottom:"../../../../src/img/"+ clothes.bottom[randb]+".jpg",umbrella:0,top1:clothes.top[randt],bottom1:clothes.bottom[randb]}); |
61 | 61 | ||
62 | } | 62 | } |
63 | else return res.status(404).json({ MatchingSuccess: false }); | 63 | else return res.status(404).json({ MatchingSuccess: false }); | ... | ... |
-
Please register or login to post a comment