Toggle navigation
Toggle navigation
This project
Loading...
Sign in
장재훈
/
TFT_Chat_Bot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
2
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
장재훈
2020-06-24 13:45:49 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5dbcfe0c677efbcc4f870d9e3dc9e4fac9d20f30
5dbcfe0c
1 parent
2974e080
modified app.js
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
data/app.js
data/app.js
View file @
5dbcfe0
...
...
@@ -14,8 +14,10 @@ app.use(bodyParser.urlencoded({
app
.
use
(
'/api'
,
apiRouter
);
apiRouter
.
post
(
'/champion'
,
function
(
req
,
res
)
{
console
.
log
(
req
.
body
)
const
championName
=
req
[
"detailParams"
][
"champion_name"
][
"value"
];
const
championName
=
req
.
body
[
"userRequest"
][
"utterance"
];
const
imageUrl
=
"data/Image data/champions/"
+
championName
+
".png"
;
// data/Image data/champions/갱플랭크.png
console
.
log
(
imageUrl
);
let
championRawData
=
fs
.
readFileSync
(
'data/json data/champions.json'
);
let
championData
=
JSON
.
parse
(
championRawData
);
var
i
=
0
;
...
...
@@ -24,7 +26,7 @@ apiRouter.post('/champion', function(req, res) {
break
;
}
};
const
championQuery
=
(
championData
[
i
].
championID
).
replace
(
/"TF3_"/g
,
''
);
const
championQuery
=
championData
[
i
].
championId
.
substring
(
4
);
const
responseBody
=
{
"version"
:
"2.0"
,
"template"
:
{
...
...
Please
register
or
login
to post a comment