storj/web/satellite/tests/unit/mock/api/buckets.ts
VitaliiShpital 51a712f9e8 satellite/console: get all bucket names endpoint and service method
WHAT:
new endpoint for fetching all bucket names

WHY:
used by new access grant flow

Change-Id: I356a3381359665fd2726120139b34b1e611fe3c4
2020-11-16 17:51:40 +02:00

18 lines
488 B
TypeScript

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
import { BucketCursor, BucketPage, BucketsApi } from '@/types/buckets';
/**
* Mock for BucketsApi
*/
export class BucketsMock implements BucketsApi {
get(projectId: string, before: Date, cursor: BucketCursor): Promise<BucketPage> {
return Promise.resolve(new BucketPage());
}
getAllBucketNames(projectId: string): Promise<string[]> {
return Promise.resolve(['test']);
}
}