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 18:54:24 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fdfcf73b02117db1a28687ace599e6a15fdd4b4c
fdfcf73b
1 parent
00f0abab
[UPDATE]Umbrella
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
weather_briefing/server/clothes.js
weather_briefing/server/clothes.js
View file @
fdfcf73
...
...
@@ -56,7 +56,9 @@ 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
)
{
return
res
.
status
(
200
).
json
({
top
:
"../../../../src/img/"
+
clothes
.
top
[
randt
]
+
".jpg"
,
bottom
:
"../../../../src/img/"
+
clothes
.
bottom
[
randb
]
+
".jpg"
});
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
});
}
else
return
res
.
status
(
404
).
json
({
MatchingSuccess
:
false
});
});
...
...
Please
register
or
login
to post a comment