Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrehault committed Apr 25, 2024
1 parent 9db94f8 commit 7798473
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 1.3.0 (2024-04-25)

- Support deletion syncing
- Support deletion syncing (when a file is deleted in a source, the corresponding resource is deleted in the Nuclia Knowledge Box)

# 1.2.21 (2024-04-18)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ export class GDriveImpl extends OAuthBaseConnector implements IConnector {
} else {
const nextPage = res['nextPageToken'];
const items = (res.files || [])
// eslint-disable-next-line @typescript-eslint/no-explicit-any
.filter((item: any) => !item.trashed)
.map((item: unknown) => this.mapToSyncItem(item));
const results = {
Expand Down
17 changes: 8 additions & 9 deletions server/src/logic/sync/domain/sync.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,14 @@ export class SyncEntity {
const foldersToSyncUpdated: SyncItem[] = (this.foldersToSync ?? []).filter(
(folder) => folder.status === FileStatus.UPLOADED,
);
const getFilesFoldersUpdated =
foldersToSyncUpdated.length > 0
? this.sourceConnector!.getLastModified(
this.lastSyncGMT || '2000-01-01T00:00:00.000Z',
foldersToSyncUpdated,
existings,
)
: of({ items: [] } as SearchResults);

let getFilesFoldersUpdated = of({ items: [] } as SearchResults);
if (foldersToSyncUpdated.length > 0) {
getFilesFoldersUpdated = this.sourceConnector!.getLastModified(
this.lastSyncGMT || '2000-01-01T00:00:00.000Z',
foldersToSyncUpdated,
existings,
);
}
const getFilesFolderPending =
foldersToSyncPending.length > 0
? this.sourceConnector!.getFilesFromFolders(foldersToSyncPending)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { concatMap, delay, filter, from, lastValueFrom, map, of, switchMap, tap, toArray } from 'rxjs';
import { concatMap, delay, filter, from, lastValueFrom, map, of, switchMap, toArray } from 'rxjs';

import { EVENTS } from '../../../../events/events';
import { eventEmitter } from '../../../../server';
Expand Down

0 comments on commit 7798473

Please sign in to comment.