Compute any new Workspace version from APP_VERSION (#10893)
# Introduction We want any new activated workspace to be filled with a version equal to the current `APP_VERSION` Please note that in a workspace lifecycle this operation will be run only once, discussed with @charlesBochet in front of `3 fois plus de piments` Going straightforward in this PR in order to release asap Started et will continue to implem new integrations regarding `SignUp` and `ActivateWorkspace` happy and expections path in https://github.com/twentyhq/twenty/tree/prastoin-new-workspace-has-version-integrations-tests
This commit is contained in:
@ -271,9 +271,12 @@ export class WorkspaceService extends TypeOrmQueryService<Workspace> {
|
|||||||
});
|
});
|
||||||
await this.userWorkspaceService.createWorkspaceMember(workspace.id, user);
|
await this.userWorkspaceService.createWorkspaceMember(workspace.id, user);
|
||||||
|
|
||||||
|
const appVersion = this.environmentService.get('APP_VERSION') ?? null;
|
||||||
|
|
||||||
await this.workspaceRepository.update(workspace.id, {
|
await this.workspaceRepository.update(workspace.id, {
|
||||||
displayName: data.displayName,
|
displayName: data.displayName,
|
||||||
activationStatus: WorkspaceActivationStatus.ACTIVE,
|
activationStatus: WorkspaceActivationStatus.ACTIVE,
|
||||||
|
version: appVersion,
|
||||||
});
|
});
|
||||||
|
|
||||||
return await this.workspaceRepository.findOneBy({
|
return await this.workspaceRepository.findOneBy({
|
||||||
|
|||||||
Reference in New Issue
Block a user