refactor(federation): 🔥 Remove confusing User federation methods

This commit is contained in:
Jesse Wierzbinski 2025-04-08 17:27:08 +02:00
parent 9ff9b90f6b
commit 54b2dfb78d
No known key found for this signature in database
12 changed files with 72 additions and 94 deletions

View file

@ -3,6 +3,7 @@ import chalk from "chalk";
// biome-ignore lint/correctness/noUnusedImports: Root import is required or the Clec type definitions won't work
import { type Root, defineCommand } from "clerc";
import ora from "ora";
import { User } from "~/classes/database/user.ts";
import { retrieveUser } from "../utils.ts";
export const refetchUserCommand = defineCommand(
@ -29,7 +30,7 @@ export const refetchUserCommand = defineCommand(
const spinner = ora("Refetching user").start();
try {
await user.updateFromRemote();
await User.fromVersia(user.uri);
} catch (error) {
spinner.fail(
`Failed to refetch user ${chalk.gray(user.data.username)}`,