mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #2672 from overleaf/jpa-import-670
[misc] ProjectUploadController: use camelCase for log context fields GitOrigin-RevId: f834fe1546dd8e94830251b5cd63f8407cd6a482
This commit is contained in:
parent
574e6262a9
commit
44cb795050
1 changed files with 9 additions and 6 deletions
|
@ -59,7 +59,7 @@ module.exports = ProjectUploadController = {
|
||||||
timer.done()
|
timer.done()
|
||||||
if (error != null) {
|
if (error != null) {
|
||||||
logger.error(
|
logger.error(
|
||||||
{ err: error, file_path: path, file_name: name },
|
{ err: error, filePath: path, fileName: name },
|
||||||
'error uploading project'
|
'error uploading project'
|
||||||
)
|
)
|
||||||
if (error instanceof InvalidZipFileError) {
|
if (error instanceof InvalidZipFileError) {
|
||||||
|
@ -87,7 +87,10 @@ module.exports = ProjectUploadController = {
|
||||||
const project_id = req.params.Project_id
|
const project_id = req.params.Project_id
|
||||||
const { folder_id } = req.query
|
const { folder_id } = req.query
|
||||||
if (name == null || name.length === 0 || name.length > 150) {
|
if (name == null || name.length === 0 || name.length > 150) {
|
||||||
logger.err({ project_id, name }, 'bad name when trying to upload file')
|
logger.err(
|
||||||
|
{ projectId: project_id, fileName: name },
|
||||||
|
'bad name when trying to upload file'
|
||||||
|
)
|
||||||
return res.send({ success: false })
|
return res.send({ success: false })
|
||||||
}
|
}
|
||||||
const user_id = AuthenticationController.getLoggedInUserId(req)
|
const user_id = AuthenticationController.getLoggedInUserId(req)
|
||||||
|
@ -106,10 +109,10 @@ module.exports = ProjectUploadController = {
|
||||||
logger.error(
|
logger.error(
|
||||||
{
|
{
|
||||||
err: error,
|
err: error,
|
||||||
project_id,
|
projectId: project_id,
|
||||||
file_path: path,
|
filePath: path,
|
||||||
file_name: name,
|
fileName: name,
|
||||||
folder_id
|
folderId: folder_id
|
||||||
},
|
},
|
||||||
'error uploading file'
|
'error uploading file'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue