mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
init (#12608)
This commit is contained in:
parent
b73437991d
commit
8e6326f6c8
2 changed files with 18 additions and 3 deletions
|
|
@ -192,8 +192,21 @@ export const returnWorkspaceIdIfNeed = (path) => {
|
|||
};
|
||||
export const getRedirectURL = (path) => {
|
||||
let redirectLoc = '/';
|
||||
const instanceLevelRoutes = [
|
||||
'/all-users',
|
||||
'/all-workspaces',
|
||||
'/manage-instance-settings',
|
||||
'/white-labelling',
|
||||
'/instance-login',
|
||||
'/smtp',
|
||||
'/license',
|
||||
];
|
||||
if (path) {
|
||||
redirectLoc = `${returnWorkspaceIdIfNeed(path)}${path !== '/' ? path : ''}`;
|
||||
if (instanceLevelRoutes.includes(path)) {
|
||||
redirectLoc = `/settings${path}`;
|
||||
} else {
|
||||
redirectLoc = `${returnWorkspaceIdIfNeed(path)}${path !== '/' ? path : ''}`;
|
||||
}
|
||||
} else {
|
||||
const redirectTo = getRedirectTo();
|
||||
const { from } = redirectTo ? { from: { pathname: redirectTo } } : { from: { pathname: '/' } };
|
||||
|
|
|
|||
|
|
@ -27,8 +27,10 @@ export class LicenseOrganizationService implements ILicenseOrganizationService {
|
|||
}
|
||||
|
||||
async limit(manager?: EntityManager): Promise<void> {
|
||||
const licenseTerms = await this.licenseTermsService.getLicenseTerms(LICENSE_FIELD.WORKSPACES);
|
||||
|
||||
const licenseTerms = await this.licenseTermsService.getLicenseTerms([
|
||||
LICENSE_FIELD.WORKSPACES,
|
||||
LICENSE_FIELD.STATUS,
|
||||
]);
|
||||
return await dbTransactionWrap(async (manager: EntityManager) => {
|
||||
return {
|
||||
workspacesCount: generatePayloadForLimits(
|
||||
|
|
|
|||
Loading…
Reference in a new issue