mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(federation): 🔥 Remove confusing User federation methods
This commit is contained in:
parent
9ff9b90f6b
commit
54b2dfb78d
12 changed files with 72 additions and 94 deletions
|
|
@ -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)}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue