mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 12:49:16 +02:00
refactor(database): Remove unused columns and rename baseUrl to domain
This commit is contained in:
parent
35d285bb2a
commit
df2a5ce260
16 changed files with 2448 additions and 59 deletions
|
|
@ -18,18 +18,18 @@ export const refetchInstanceCommand = defineCommand(
|
|||
? new URL(url_or_host).host
|
||||
: url_or_host;
|
||||
|
||||
const instance = await Instance.fromSql(eq(Instances.baseUrl, host));
|
||||
const instance = await Instance.fromSql(eq(Instances.domain, host));
|
||||
|
||||
if (!instance) {
|
||||
throw new Error(`Instance ${chalk.gray(host)} not found.`);
|
||||
}
|
||||
|
||||
await fetchQueue.add(FetchJobType.Instance, {
|
||||
uri: new URL(`https://${instance.data.baseUrl}`).origin,
|
||||
uri: new URL(`https://${instance.data.domain}`).origin,
|
||||
});
|
||||
|
||||
console.info(
|
||||
`Refresh job enqueued for ${chalk.gray(instance.data.baseUrl)}.`,
|
||||
`Refresh job enqueued for ${chalk.gray(instance.data.domain)}.`,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export const deleteUserCommand = defineCommand(
|
|||
`Created At: ${chalk.blue(user.data.createdAt.toISOString())}`,
|
||||
);
|
||||
console.info(
|
||||
`Instance: ${chalk.blue(user.data.instance?.baseUrl || "Local")}`,
|
||||
`Instance: ${chalk.blue(user.data.instance?.domain || "Local")}`,
|
||||
);
|
||||
|
||||
if (confirmFlag) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue