|
|
@ -5,13 +5,15 @@ async function addEditFile (ctx, next) { |
|
|
|
try { |
|
|
|
const models = ctx.fs.dc.models; |
|
|
|
const data = ctx.request.body; |
|
|
|
const { higherFileId, fileName } = data |
|
|
|
const { higherFileId, fileName, projectId, type } = data |
|
|
|
|
|
|
|
|
|
|
|
let onefind = await models.ProjectFolder.findOne({ |
|
|
|
where: { |
|
|
|
higherFileId: higherFileId || null, |
|
|
|
fileName |
|
|
|
fileName, |
|
|
|
projectId, |
|
|
|
type |
|
|
|
} |
|
|
|
}) |
|
|
|
if (onefind) { |
|
|
|