hcengineering / hcengineering/platform

workSpaceUrl is unique

Open
#5,140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
27.7k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

https://github.com/hcengineering/platform/blob/c8a58d542805be956067a211dd7616bf53d15946/server/account/src/index.ts#L753-L760

workspace is unique and workspaceUrl contains it.
so workspaceUrl is also unique we can create an unique index for it for simplification

there are so many string manipulation which is not needed in this function and so in the database

we can easily put w-{md5(email, workspaceName)} as the workspace without any for loop and redundant db calls bcz it will be always unique and also put workspaceUrl same as workspace to decrease the confusion in the code and db and user can update wsUrl whenever he/she wants

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.