Compare commits
2 Commits
cloud/rese
...
fix/pt-BR
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63741907d5 | ||
|
|
60161ac25c |
@@ -35,7 +35,6 @@ export function Tooltip({
|
|||||||
delay,
|
delay,
|
||||||
interactive: false,
|
interactive: false,
|
||||||
theme: "tooltip",
|
theme: "tooltip",
|
||||||
touch: false,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import type { dbClient } from "@kan/db/client";
|
|||||||
import * as memberRepo from "@kan/db/repository/member.repo";
|
import * as memberRepo from "@kan/db/repository/member.repo";
|
||||||
import * as subscriptionRepo from "@kan/db/repository/subscription.repo";
|
import * as subscriptionRepo from "@kan/db/repository/subscription.repo";
|
||||||
import * as workspaceRepo from "@kan/db/repository/workspace.repo";
|
import * as workspaceRepo from "@kan/db/repository/workspace.repo";
|
||||||
import { generateUID } from "@kan/shared/utils";
|
|
||||||
import { sendEmail } from "@kan/email";
|
import { sendEmail } from "@kan/email";
|
||||||
import { createStripeClient } from "@kan/stripe";
|
import { createStripeClient } from "@kan/stripe";
|
||||||
|
|
||||||
@@ -133,23 +132,8 @@ export function createPlugins(db: dbClient) {
|
|||||||
|
|
||||||
if (workspace?.id) {
|
if (workspace?.id) {
|
||||||
await memberRepo.pauseAllMembers(db, workspace.id);
|
await memberRepo.pauseAllMembers(db, workspace.id);
|
||||||
|
|
||||||
// Reset slug to publicId, or generate a UID if publicId is taken
|
|
||||||
let newSlug = workspace.publicId;
|
|
||||||
|
|
||||||
if (workspace.slug !== workspace.publicId) {
|
|
||||||
const isPublicIdAvailable = await workspaceRepo.isWorkspaceSlugAvailable(
|
|
||||||
db,
|
|
||||||
workspace.publicId,
|
|
||||||
);
|
|
||||||
if (!isPublicIdAvailable) {
|
|
||||||
newSlug = generateUID();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await workspaceRepo.update(db, subscription.referenceId, {
|
await workspaceRepo.update(db, subscription.referenceId, {
|
||||||
plan: "free",
|
plan: "free",
|
||||||
slug: newSlug,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user