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
travel
Commits
d2aec382
Commit
d2aec382
authored
Jul 28, 2022
by
Yoon, Daeki
😅
Browse files
profile delete route 변경
parent
90581820
Changes
2
Show whitespace changes
Inline
Side-by-side
frontend/src/apis/profile.api.ts
View file @
d2aec382
...
...
@@ -12,6 +12,6 @@ export const profileUpload = async (formdata: FormData) => {
};
export
const
deleteUser
=
async
()
=>
{
const
success
=
await
axios
.
delete
(
`
${
baseUrl
}
/profile
/delete
`
);
const
success
=
await
axios
.
delete
(
`
${
baseUrl
}
/profile`
);
return
success
;
};
src/routes/profile.route.ts
View file @
d2aec382
...
...
@@ -6,8 +6,7 @@ const router = express.Router();
router
.
route
(
"
/
"
)
.
get
(
authCtrl
.
requireLogin
,
userCtrl
.
getProfile
)
.
delete
(
authCtrl
.
requireLogin
,
userCtrl
.
deleteUser
)
.
post
(
authCtrl
.
requireLogin
,
fileInfoCtrl
.
uploadFile
,
userCtrl
.
updateProfile
);
//중간에 req쪽에 fields와 files 넣는 미들웨어 추가
router
.
route
(
"
/delete
"
).
delete
(
authCtrl
.
requireLogin
,
userCtrl
.
deleteUser
);
export
default
router
;
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