Toggle navigation
Toggle navigation
This project
Loading...
Sign in
정민우
/
vps_service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
정민우
2021-06-10 23:53:32 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
08dde729f076913e467c692f0422293696ff1abe
08dde729
1 parent
90db42a3
[Edit] dockerfile add 예외처리
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
backend/controllers/dockerController.js
backend/controllers/dockerController.js
View file @
08dde72
...
...
@@ -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
)
=>
{
...
...
Please
register
or
login
to post a comment