fix: move NO_PORTALS_ERROR to types and re-import
This commit is contained in:
parent
623bbf3235
commit
2c6b8438e1
|
@ -6,8 +6,7 @@ import {
|
|||
} from "binconv";
|
||||
import { equalBytes } from "@noble/curves/abstract/utils";
|
||||
import { blake3 } from "@noble/hashes/blake3";
|
||||
|
||||
const NO_PORTALS_ERROR = new Error("no active portals");
|
||||
import { NO_PORTALS_ERROR } from "#types.js";
|
||||
|
||||
export async function downloadObject(cid: string): Promise<ReadableStream> {
|
||||
const activePortals = getActivePortals();
|
||||
|
|
|
@ -3,4 +3,7 @@ interface Portal {
|
|||
name: string;
|
||||
url: string;
|
||||
}
|
||||
export { Portal };
|
||||
|
||||
const NO_PORTALS_ERROR = new Error("no active portals");
|
||||
|
||||
export { Portal, NO_PORTALS_ERROR };
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import { ErrTuple } from "#types.js";
|
||||
import { ErrTuple, NO_PORTALS_ERROR } from "#types.js";
|
||||
import { getActivePortals } from "#portal.js";
|
||||
import { NO_PORTALS_ERROR } from "#err.js";
|
||||
|
||||
export async function uploadObject(
|
||||
file:
|
||||
|
|
Loading…
Reference in New Issue