Skip to content

Commit

Permalink
s3 챌린지 인증 요청 전송
Browse files Browse the repository at this point in the history
  • Loading branch information
bhh9860 committed Dec 14, 2023
1 parent 7c79960 commit 6b5549c
Show file tree
Hide file tree
Showing 6 changed files with 1,777 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ DB_DATABASE=<DB_DATABASE>

SERVER_URL=<SERVER_URL>

JWT_SECRET_KEY=<JWT_SECRET_KEY>
JWT_SECRET_KEY=<JWT_SECRET_KEY>

AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID>
AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY>
18 changes: 18 additions & 0 deletions controllers/challengeController.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,24 @@ const challengeController = {
});
}
},
submitImage: async (req, res) => {
const result = await challengeService.submitImage(req, res);
if (result.success) {
return res.status(200).json({
success: true,
message: '이미지 업로드에 성공했습니다.',
data: {
IMG_URL: result.data,
},
});
} else {
return res.status(400).json({
success: false,
message: '이미지 업로드에 실패했습니다.',
err: result.err,
});
}
},
};

module.exports = {
Expand Down
Loading

0 comments on commit 6b5549c

Please sign in to comment.