Skip to content

Commit

Permalink
Rm logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey-weber committed Sep 30, 2024
1 parent 2fcd995 commit 33d28d9
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/services/entry/actions/update-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,13 @@ export async function updateEntry(ctx: CTX, updateData: UpdateEntryData) {
>;
const newKey = entryObjInnerMeta.oldKey;

const keyLowerCase = newKey.toLowerCase();
const isFolder = Utils.isFolder({scope: entryObj.scope});
const keyFormatted = Utils.formatKey(keyLowerCase, isFolder);
console.log('keyFormattedasd: ', keyFormatted, 'newKeyasds: ', newKey);
if (!entryObj.workbookId) {
const keyLowerCase = newKey.toLowerCase();
const isFolder = Utils.isFolder({scope: entryObj.scope});
const keyFormatted = Utils.formatKey(keyLowerCase, isFolder);

const parentFolderKeys = Utils.getFullParentFolderKeys(keyFormatted);
console.log('parentFolderKeyss: ', parentFolderKeys);

const promisesParentFolders = parentFolderKeys.map((folderKey) => {
return Entry.query(trx)
.where({
Expand All @@ -435,8 +435,6 @@ export async function updateEntry(ctx: CTX, updateData: UpdateEntryData) {

const parentFolders = await Promise.all(promisesParentFolders);

console.log('parentFoldersasd: ', parentFolders);

const deletedParentFolderNames: string[] = [];

parentFolders.forEach((folder) => {
Expand All @@ -445,8 +443,6 @@ export async function updateEntry(ctx: CTX, updateData: UpdateEntryData) {
}
});

console.log('deletedParentFoldersasd: ', deletedParentFolderNames);

if (deletedParentFolderNames.length) {
throw new AppError(
`Before restoring entity, you need to restore these parent folders - '${deletedParentFolderNames.join(
Expand Down

0 comments on commit 33d28d9

Please sign in to comment.