정민우

Merge branch 'backend-docker' into 'master'

[Edit] dockerfile add 예외처리



See merge request !9
......@@ -19,6 +19,7 @@ exports.addDockerfile = async (req, res) => {
logging('dockerfile', 'error', { code: 400, message: `missingKey:${required}` }, req)
return sendError(res, 400, `missingKey:${required}`)
}
try {
let dockerfileInfo = {}
dockerfileInfo.userId = id
dockerfileInfo.content = req.body.content
......@@ -34,6 +35,11 @@ exports.addDockerfile = async (req, res) => {
let user = await Dockerfile.create(dockerfileInfo)
logging('dockerfile', 'add dockerfile', user, req)
return sendResponse(res, user, 200)
} catch (error) {
logging('dockerfile', 'error', { code: 500, message: error.message }, req)
return sendError(res, 500, error.message)
}
}
exports.listDockerfile = async (req, res) => {
......