mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 12:35:02 +02:00
UBER-62: Maintenance warnings (#3210)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
//
|
||||
|
||||
import core, {
|
||||
Account,
|
||||
Class,
|
||||
ClientConnection,
|
||||
Doc,
|
||||
@@ -65,6 +66,10 @@ class ServerStorageWrapper implements ClientConnection {
|
||||
})
|
||||
}
|
||||
|
||||
async getAccount (): Promise<Account> {
|
||||
return (await this.storage.findAll(this.measureCtx, core.class.Account, {}))[0]
|
||||
}
|
||||
|
||||
async tx (tx: Tx): Promise<TxResult> {
|
||||
const _tx = protoDeserialize(protoSerialize(tx, false), false)
|
||||
const [result, derived] = await this.storage.tx(this.measureCtx, _tx)
|
||||
|
||||
@@ -13,18 +13,18 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { createClient, Client } from '@hcengineering/core'
|
||||
import { getMetadata, getResource } from '@hcengineering/platform'
|
||||
import { migrateOperations } from '@hcengineering/model-all'
|
||||
import { connect } from './connection'
|
||||
import clientPlugin from '@hcengineering/client'
|
||||
import { AccountClient, createClient } from '@hcengineering/core'
|
||||
import { migrateOperations } from '@hcengineering/model-all'
|
||||
import { getMetadata, getResource } from '@hcengineering/platform'
|
||||
import { connect } from './connection'
|
||||
|
||||
let client: Client
|
||||
let client: AccountClient
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export default async () => {
|
||||
return {
|
||||
function: {
|
||||
GetClient: async (): Promise<Client> => {
|
||||
GetClient: async (): Promise<AccountClient> => {
|
||||
if (client === undefined) {
|
||||
client = await createClient(connect)
|
||||
for (const op of migrateOperations) {
|
||||
|
||||
Reference in New Issue
Block a user