platform/plugins/guest/src/utils.ts
Denis Bykhov 2fb4763f3f
remove extra spaces (#5930)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
2024-06-28 08:55:32 +05:00

29 lines
630 B
TypeScript

//
// Copyright © 2024 Hardcore Engineering Inc.
//
import core, { Doc, TxOperations } from '@hcengineering/core'
import { type Location } from '@hcengineering/ui'
import guest from './index'
export async function createPublicLink (
client: TxOperations,
object: Doc,
location: Location,
revokable: boolean = true
): Promise<void> {
await client.createDoc(guest.class.PublicLink, core.space.Workspace, {
attachedTo: object._id,
location,
revokable,
restrictions: {
readonly: true,
disableNavigation: true,
disableActions: true,
disableComments: true
},
url: ''
})
}