Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-CloudComputing
/
C_Team_KhuDrive
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
김재형
2020-06-08 15:35:58 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
14bf9aaa95ccbe45ee68b7b267e63e32bdd698d5
14bf9aaa
1 parent
d88c58df
Implement dummy login path
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
frontend/.eslintrc.json
frontend/src/server.ts
frontend/.eslintrc.json
View file @
14bf9aa
...
...
@@ -21,6 +21,7 @@
"react/display-name"
:
"off"
,
"react/prop-types"
:
"off"
,
"no-empty"
:
[
"warn"
,
{
"allowEmptyCatch"
:
true
}],
"@typescript-eslint/camelcase"
:
"off"
,
"@typescript-eslint/explicit-function-return-type"
:
"off"
,
"@typescript-eslint/explicit-member-accessibility"
:
"off"
,
"@typescript-eslint/interface-name-prefix"
:
"off"
,
...
...
frontend/src/server.ts
View file @
14bf9aa
...
...
@@ -67,6 +67,26 @@ createServer({
},
};
});
this
.
post
(
"/users/login"
,
(
schema
,
request
)
=>
{
const
body
=
JSON
.
parse
(
request
.
requestBody
);
if
(
body
.
user_id
===
"admin"
&&
body
.
password
===
"password"
)
{
return
{
status
:
200
,
data
:
{
access_token
:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
,
refresh_token
:
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
,
expiration
:
"2020-05-14T07:23:24Z"
,
},
};
}
return
{
status
:
401
,
message
:
"unauthorized"
,
};
});
},
seeds
(
server
)
{
...
...
Please
register
or
login
to post a comment