Skip to content

Commit

Permalink
fix: 🐛 compiler errorrs
Browse files Browse the repository at this point in the history
  • Loading branch information
ignazio-bovo committed May 16, 2024
1 parent 47f47e5 commit c80488d
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 56 deletions.
21 changes: 0 additions & 21 deletions storage-node/src/commands/util/fileStorageSetup.ts

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion storage-node/src/services/storageProviders/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './IConnectionHandler'
export * from './awsConnectionHandler'
export * from './azureConnectionHandler'
export * from './utils'
1 change: 1 addition & 0 deletions storage-node/src/services/sync/tasks/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './DownloadTask'
export * from './StorageProviderSyncTask'
export * from './DeleteLocalFileTask'
export * from './ISyncTask'
2 changes: 0 additions & 2 deletions storage-node/src/services/webApi/controllers/filesApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import {
getDataObjectIdFromCache,
} from '../../caching/localDataObjects'
import { getStorageProviderConnection, isStorageProviderConnectionEnabled } from 'src/commands/server'
import { Readable, Writable } from 'stream'
import { stream } from 'winston'
const fsPromises = fs.promises

const FileInfoCache = new Map<string, FileInfo>()
Expand Down
11 changes: 4 additions & 7 deletions storage-node/src/services/webApi/controllers/stateApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
VersionResponse,
} from '../types'
import { AppConfig, sendResponseWithError } from './common'
import { getDataObjectIDs } from '../../../services/caching/localDataObjects'
const fsPromises = fs.promises

// Expiration period in seconds for the local cache.
Expand All @@ -35,9 +36,8 @@ export async function getAllLocalDataObjects(
res: express.Response<DataObjectResponse, AppConfig>,
next: express.NextFunction
): Promise<void> {
const { dataObjectCache } = res.locals
try {
const ids = await dataObjectCache.getDataObjectIDs()
const ids = getDataObjectIDs()

res.status(200).json(ids)
} catch (err) {
Expand Down Expand Up @@ -111,13 +111,10 @@ export async function getLocalDataObjectsByBagId(
next: express.NextFunction
): Promise<void> {
try {
const { qnApi, dataObjectCache } = res.locals
const { qnApi } = res.locals
const { bagId } = req.params

const [ids, requiredIds] = await Promise.all([
dataObjectCache.getDataObjectIDs(),
getCachedDataObjectsObligations(qnApi, bagId),
])
const [ids, requiredIds] = await Promise.all([getDataObjectIDs(), getCachedDataObjectsObligations(qnApi, bagId)])

const localDataForBag = _.intersection(ids, requiredIds)

Expand Down

0 comments on commit c80488d

Please sign in to comment.