Toggle navigation
Toggle navigation
This project
Loading...
Sign in
HyeonJun Jeon
/
Extended-Calendar
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
박시진
2022-06-06 03:08:02 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
79c7558282b7fddeb87587765d7aba9ae83e1eef
79c75582
1 parent
57e654f0
[Add]Test file (check login_success&info)
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
15 deletions
server/libs/E_Campus.js
server/libs/test.js
server/routers/login.js
server/libs/E_Campus.js
View file @
79c7558
...
...
@@ -161,15 +161,5 @@ exports.getSubjects = getSubjects;
exports
.
close
=
close
;
//console test
async
function
runrun
()
{
page
=
await
login
(
"2021105253"
,
"lorem"
);
await
getPeed
(
page
);
await
getSubjects
(
page
);
await
close
();
console
.
log
(
Info
);
console
.
log
(
Info
.
subjects
)
}
runrun
();
...
...
server/libs/test.js
0 → 100644
View file @
79c7558
const
express
=
require
(
"express"
);
const
router
=
express
.
Router
();
const
{
getPeed
,
getSubjects
,
login
,
close
}
=
require
(
"./E_Campus.js"
);
async
function
runrun
()
{
page
=
await
login
(
"lorem"
,
"lorem"
);
await
getPeed
(
page
);
await
getSubjects
(
page
);
await
close
();
console
.
log
(
Info
);
console
.
log
(
Info
.
subjects
)
}
runrun
();
\ No newline at end of file
server/routers/login.js
View file @
79c7558
const
express
=
require
(
"express"
);
const
router
=
express
.
Router
();
// const { getPeed, getSubjects, login
} = require("../libs/E_Campus.js");
const
{
login
}
=
require
(
"../libs/E_Campus.js"
);
const
{
getPeed
,
getSubjects
,
login
,
close
}
=
require
(
"../libs/E_Campus.js"
);
router
.
post
(
"/"
,
async
(
req
,
res
)
=>
{
console
.
log
(
`listened /login
${
req
.
body
.
id
}
${
req
.
body
.
pw
}
`
);
const
Info
=
await
login
(
req
.
body
.
id
,
req
.
body
.
pw
);
if
(
Info
.
id
!=
"null"
)
{
const
page
=
await
login
(
req
.
body
.
id
,
req
.
body
.
pw
);
if
(
page
)
{
try
{
// const peed = await getPeed(page);
res
.
send
(
"success"
);
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
Please
register
or
login
to post a comment