Toggle navigation
Toggle navigation
This project
Loading...
Sign in
허연우
/
FindMe.GG
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
chrisheo
2022-11-30 10:40:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fab22033853cd3cd2cd26aff989df32477a3ee83
fab22033
1 parent
8db18b69
feat: Add tft check button in index pages
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
back/router/main.js
back/views/index_lol.ejs
back/views/index_tft.ejs
back/router/main.js
View file @
fab2203
...
...
@@ -2,7 +2,7 @@ module.exports = function (app) {
var
request
=
require
(
"request"
);
var
urlenconde
=
require
(
'urlencode'
);
var
apikey
=
"RGAPI-
3f849a35-01f8-4915-a606-87cfc4800ef2
"
//api
var
apikey
=
"RGAPI-
20b1defe-a1a0-40b5-abcf-b6e229fad8e9
"
//api
app
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
render
(
'main'
,
{
title
:
'R U TROLL?'
});
...
...
@@ -71,7 +71,7 @@ module.exports = function (app) {
app
.
get
(
'/search/:username/'
,
function
(
req
,
res
){
//롤 api url
name
=
req
.
params
.
username
;
var
nameUrl
=
"https://kr.api.riotgames.com/lol/summoner/v
3
/summoners/by-name/"
+
urlenconde
(
name
)
+
"?api_key="
+
apikey
;
var
nameUrl
=
"https://kr.api.riotgames.com/lol/summoner/v
4
/summoners/by-name/"
+
urlenconde
(
name
)
+
"?api_key="
+
apikey
;
request
(
nameUrl
,
function
(
error
,
response
,
body
){
var
info_summoner_json
=
JSON
.
parse
(
body
);
accountId
=
info_summoner_json
[
"accountId"
];
...
...
back/views/index_lol.ejs
View file @
fab2203
...
...
@@ -53,7 +53,11 @@
<img
src=
"/FindMelogo.png"
width =
150,
height =
150/
>
</div>
<div
class=
"center2"
>
<div>
<input
type=
"text"
class=
"input_text"
placeholder=
"소환사 이름"
>
<input
type=
"checkbox"
id=
"tft_check"
name=
"tft_check"
checked
>
<label
for=
"tft_check"
>
TFT
</label>
</div>
<span
class=
"input-group-btn"
>
<button
id=
"searchButton"
class=
"btn btn-primary"
type=
"button"
onclick=
"search(name)"
>
click!
</button>
</span>
...
...
back/views/index_tft.ejs
View file @
fab2203
...
...
@@ -53,7 +53,11 @@
<img
src=
"/FindMelogo.png"
width =
150,
height =
150/
>
</div>
<div
class=
"center2"
>
<div>
<input
type=
"text"
class=
"input_text"
placeholder=
"소환사 이름"
>
<input
type=
"checkbox"
id=
"tft_check"
name=
"tft_check"
checked
>
<label
for=
"tft_check"
>
TFT
</label>
</div>
<span
class=
"input-group-btn"
>
<button
id=
"searchButton"
class=
"btn btn-primary"
type=
"button"
onclick=
"search(name)"
>
click!
</button>
</span>
...
...
Please
register
or
login
to post a comment