Skip to content
Snippets Groups Projects
Commit daf3f47b authored by MinJae Kwon's avatar MinJae Kwon
Browse files

fix: case the id to int

parent d86e975a
No related branches found
No related tags found
1 merge request!46fix: case the id to int
......@@ -218,7 +218,7 @@ exports.updateUser = async (req, res) => {
const userID = req.user.userID;
if (req.params.id !== userID) {
if (parseInt(req.params.id) !== parseInt(userID)) {
return res.status(403).json({
error: '사용자 정보를 업데이트할 권한이 없습니다.'
});
......@@ -279,7 +279,7 @@ exports.updateUser = async (req, res) => {
exports.deleteUser = async (req, res) => {
const userID = req.user.userID;
if (req.params.id !== userID) {
if (parseInt(req.params.id) !== parseInt(userID)) {
return res.status(403).json({
error: '사용자 정보를 삭제할 권한이 없습니다.'
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment