Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
survey
Commits
256b8285
Commit
256b8285
authored
Jul 08, 2022
by
Yoon, Daeki
😅
Browse files
메소드 위치 변경
parent
f5f8f2b1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/controllers/user.controller.ts
View file @
256b8285
...
...
@@ -2,10 +2,6 @@ import { NextFunction, Request, Response } from "express";
import
{
userDb
}
from
"
../db
"
;
import
{
asyncWrap
}
from
"
../helpers/asyncWrap
"
;
import
{
TypedRequestAuth
}
from
"
./auth.controller
"
;
export
const
getUsers
=
asyncWrap
(
async
(
req
,
res
)
=>
{
const
users
=
await
userDb
.
getUsers
();
return
res
.
json
(
users
);
});
export
const
createUser
=
asyncWrap
(
async
(
req
,
res
)
=>
{
const
user
=
req
.
body
;
...
...
@@ -21,6 +17,11 @@ export const deleteUser = asyncWrap(async (req, res) => {
return
res
.
json
(
deletedUser
);
});
export
const
getUsers
=
asyncWrap
(
async
(
req
,
res
)
=>
{
const
users
=
await
userDb
.
getUsers
();
return
res
.
json
(
users
);
});
export
const
userById
=
async
(
reqExp
:
Request
,
res
:
Response
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment