Skip to content
This repository was archived by the owner on Oct 25, 2023. It is now read-only.

Commit b21b053

Browse files
committed
rm unused features of StorageApi.node.slice
1 parent 4b7b8a2 commit b21b053

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

smuggler-api/src/api_datacenter.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,18 +348,16 @@ const getNodesSlice: GetNodesSliceFn = async ({
348348
}
349349

350350
function _getNodesSliceIter({
351-
end_time,
352351
start_time,
353-
limit,
354352
origin,
355353
bucket_time_size,
356354
}: GetNodeSliceArgs) {
357355
return new TNodeSliceIterator(
358356
getNodesSlice,
359357
start_time,
360-
end_time,
358+
undefined,
361359
bucket_time_size,
362-
limit,
360+
undefined,
363361
origin
364362
)
365363
}

smuggler-api/src/steroid/node.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
genOriginId,
2222
} from 'armoury'
2323
import type { Optional } from 'armoury'
24-
import { CreateNodeArgs, StorageApi } from '../storage_api'
24+
import { CreateNodeArgs, GetNodeSliceArgs, StorageApi } from '../storage_api'
2525
import { NodeUtil } from '../typesutil'
2626
import lodash from 'lodash'
2727

@@ -314,7 +314,7 @@ export async function lookupNodes(
314314
return storage.node.get({ nid: key.nid, signal })
315315
} else if ('webBookmark' in key) {
316316
const { id, stableUrl } = genOriginId(key.webBookmark.url)
317-
const query = { ...SLICE_ALL, origin: { id } }
317+
const query: GetNodeSliceArgs = { ...SLICE_ALL, origin: { id } }
318318
const iter = storage.node.slice(query)
319319

320320
for (let node = await iter.next(); node != null; node = await iter.next()) {
@@ -326,7 +326,7 @@ export async function lookupNodes(
326326
return undefined
327327
} else if ('webQuote' in key) {
328328
const { id, stableUrl } = genOriginId(key.webQuote.url)
329-
const query = { ...SLICE_ALL, origin: { id } }
329+
const query: GetNodeSliceArgs = { ...SLICE_ALL, origin: { id } }
330330
const iter = storage.node.slice(query)
331331

332332
const nodes: TNode[] = []
@@ -342,7 +342,7 @@ export async function lookupNodes(
342342
return nodes
343343
} else if ('url' in key) {
344344
const { id, stableUrl } = genOriginId(key.url)
345-
const query = { ...SLICE_ALL, origin: { id } }
345+
const query: GetNodeSliceArgs = { ...SLICE_ALL, origin: { id } }
346346
const iter = storage.node.slice(query)
347347

348348
const nodes: TNode[] = []

smuggler-api/src/storage_api.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ export type CreateNodeArgs = {
4040
}
4141

4242
export type GetNodeSliceArgs = {
43-
end_time?: number
4443
start_time?: number
45-
limit?: number
4644
origin?: OriginId
4745
bucket_time_size?: number
4846
}

0 commit comments

Comments
 (0)