Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2021-1-capstone-design1
/
RIT_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
박권수
2021-08-08 22:30:01 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f45879d9b9d442764b7942881addf823e87391a6
f45879d9
1 parent
1638b6b5
feat. web api : auth, user
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
0 deletions
web/package.json
web/src/api/api-auth.ts
web/src/api/api-user.ts
web/yarn.lock
web/package.json
View file @
f45879d
...
...
@@ -14,6 +14,7 @@
"react"
:
"^17.0.2"
,
"react-dom"
:
"^17.0.2"
,
"react-scripts"
:
"4.0.3"
,
"recoil"
:
"^0.4.0"
,
"typescript"
:
"^4.1.2"
,
"web-vitals"
:
"^1.0.1"
},
...
...
web/src/api/api-auth.ts
0 → 100644
View file @
f45879d
import
{
client
}
from
"./client"
;
export
const
authApi
=
{
register
:
(
Data
:
Object
)
=>
{
return
client
.
post
(
'/auth/register'
,
Data
);
},
login
:
(
Data
:
Object
)
=>
{
return
client
.
post
(
'/auth/login'
,
Data
);
},
logout
:
()
=>
{
return
client
.
post
(
'/auth/logout'
);
},
};
\ No newline at end of file
web/src/api/api-user.ts
0 → 100644
View file @
f45879d
import
{
client
}
from
'./client'
;
import
{
RecoilState
}
from
'recoil'
;
export
const
userApi
=
{
getMyInfo
:
(
token
:
RecoilState
<
any
>
)
=>
{
return
client
.
get
(
'/user'
,
{
headers
:
{
authorization
:
token
,
},
});
},
};
\ No newline at end of file
web/yarn.lock
View file @
f45879d
...
...
@@ -5340,6 +5340,11 @@ gzip-size@5.1.1:
duplexer "^0.1.1"
pify "^4.0.1"
hamt_plus@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/hamt_plus/-/hamt_plus-1.0.2.tgz#e21c252968c7e33b20f6a1b094cd85787a265601"
integrity sha1-4hwlKWjH4zsg9qGwlM2FeHomVgE=
handle-thing@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e"
...
...
@@ -9171,6 +9176,13 @@ readdirp@~3.5.0:
dependencies:
picomatch "^2.2.1"
recoil@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/recoil/-/recoil-0.4.0.tgz#2a933ba7c043cbf6f50f52da0828a879c7cd7d69"
integrity sha512-FZ2ljI4ldZU820V0APbKOtS4bPwPJHvpDBQEl+Cf47DMaM35wuLXl2u37E0TSgdvKAZBOUsIwcBnzE+ncODRxQ==
dependencies:
hamt_plus "1.0.2"
recursive-readdir@2.2.2:
version "2.2.2"
resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.2.tgz#9946fb3274e1628de6e36b2f6714953b4845094f"
...
...
Please
register
or
login
to post a comment