mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 09:35:00 +02:00
UBERF-8425: Global accounts (#7573)
This commit is contained in:
@@ -4,14 +4,14 @@
|
||||
//
|
||||
|
||||
import { CollaboratorClient, getClient as getCollaboratorClient } from '@hcengineering/collaborator-client'
|
||||
import { systemAccountEmail, WorkspaceId } from '@hcengineering/core'
|
||||
import { systemAccountUuid, WorkspaceUuid } from '@hcengineering/core'
|
||||
import { generateToken } from '@hcengineering/server-token'
|
||||
import config from './config'
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function createCollaboratorClient (workspaceId: WorkspaceId): CollaboratorClient {
|
||||
const token = generateToken(systemAccountEmail, workspaceId, { mode: 'github' })
|
||||
export function createCollaboratorClient (workspaceId: WorkspaceUuid): CollaboratorClient {
|
||||
const token = generateToken(systemAccountUuid, workspaceId, { service: 'github', mode: 'github' })
|
||||
return getCollaboratorClient(workspaceId, token, config.CollaboratorURL)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user