Move services to public (#6156)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-07-28 14:55:43 +07:00
committed by Andrey Sobolev
parent 9aad4a4561
commit ddecae80dd
578 changed files with 109084 additions and 390 deletions
+24
View File
@@ -0,0 +1,24 @@
import { ClientWorkspaceInfo } from '@hcengineering/account'
import config from './config'
/**
* @public
*/
export async function getWorkspaceInfo (token: string): Promise<ClientWorkspaceInfo> {
const accountsUrl = config.AccountsURL
const workspaceInfo = await (
await fetch(accountsUrl, {
method: 'POST',
headers: {
Authorization: 'Bearer ' + token,
'Content-Type': 'application/json'
},
body: JSON.stringify({
method: 'getWorkspaceInfo',
params: []
})
})
).json()
return workspaceInfo.result as ClientWorkspaceInfo
}