mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 19:58:09 +00:00
Remove contact resolver id check (#2910)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
6e10f571ad
commit
b068478d83
@ -181,19 +181,13 @@ export async function getContactLink (doc: Doc): Promise<Location> {
|
||||
return loc
|
||||
}
|
||||
|
||||
function isId (id: Ref<Contact>): boolean {
|
||||
return /^[0-9a-z]{24}$/.test(id)
|
||||
}
|
||||
|
||||
export async function resolveLocation (loc: Location): Promise<ResolvedLocation | undefined> {
|
||||
if (loc.path[2] !== contactId) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const id = loc.path[3] as Ref<Contact>
|
||||
if (isId(id)) {
|
||||
return await generateLocation(loc, id)
|
||||
}
|
||||
return await generateLocation(loc, id)
|
||||
}
|
||||
|
||||
async function generateLocation (loc: Location, id: Ref<Contact>): Promise<ResolvedLocation | undefined> {
|
||||
|
Loading…
Reference in New Issue
Block a user