Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김건희
/
OSSW_Weather_Briefing
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Seokjin
2022-06-05 19:20:13 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0e2fec8d9992d2b6b5ce3404843a412a3c29f10d
0e2fec8d
1 parent
2482c763
[UPDATE]clothesData
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
weather_briefing/server/clothes.js
weather_briefing/server/clothes.js
View file @
0e2fec8
...
...
@@ -56,8 +56,8 @@ app.post('/api/clothes', (req, res) => {
let
randb
=
Math
.
floor
(
Math
.
random
()
*
clothes
.
bottom
.
length
);
if
(
err
)
return
res
.
status
(
500
).
json
({
MatchingSuccess
:
false
});
else
if
(
clothes
)
{
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
})
else
return
res
.
status
(
200
).
json
({
top
:
"../../../../src/img/"
+
clothes
.
top
[
randt
]
+
".jpg"
,
bottom
:
"../../../../src/img/"
+
clothes
.
bottom
[
randb
]
+
".jpg"
,
umbrella
:
0
});
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
]
})
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
]
});
}
else
return
res
.
status
(
404
).
json
({
MatchingSuccess
:
false
});
...
...
Please
register
or
login
to post a comment