feat: WIP validate cloud subscription

This commit is contained in:
Zamitto 2024-10-16 01:36:36 -03:00
parent 5c4ddd9b7a
commit 4820109b8d
3 changed files with 59 additions and 27 deletions

View file

@ -10,6 +10,13 @@ export class UserNotLoggedInError extends Error {
}
}
export class UserWithoutCloudSubscriptionError extends Error {
constructor() {
super("user does not have hydra cloud subscription");
this.name = "UserWithoutCloudSubscriptionError";
}
}
const FORMAT = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
export const formatBytes = (bytes: number): string => {