generateNewId改成generateNewIdAsync
This commit is contained in:
parent
d5c61fa158
commit
4a16dcf0fc
|
|
@ -163,9 +163,7 @@ context) {
|
|||
filter: {
|
||||
id: extraFileId,
|
||||
},
|
||||
}, {
|
||||
dontCollect: true,
|
||||
});
|
||||
}, {});
|
||||
closeRootMode();
|
||||
}
|
||||
catch (err) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { generateNewId } from 'oak-domain/lib/utils/uuid';
|
||||
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||
export async function updateConfig(params, context) {
|
||||
const { entity, entityId, config } = params;
|
||||
await context.operate(entity, {
|
||||
id: generateNewId(),
|
||||
id: await generateNewIdAsync(),
|
||||
action: 'update',
|
||||
data: {
|
||||
config,
|
||||
|
|
@ -15,7 +15,7 @@ export async function updateConfig(params, context) {
|
|||
export async function updateApplicationConfig(params, context) {
|
||||
const { entity, entityId, config } = params;
|
||||
await context.operate(entity, {
|
||||
id: generateNewId(),
|
||||
id: await generateNewIdAsync(),
|
||||
action: 'update',
|
||||
data: {
|
||||
config,
|
||||
|
|
@ -28,7 +28,7 @@ export async function updateApplicationConfig(params, context) {
|
|||
export async function updateStyle(params, context) {
|
||||
const { entity, entityId, style } = params;
|
||||
await context.operate(entity, {
|
||||
id: generateNewId(),
|
||||
id: await generateNewIdAsync(),
|
||||
action: 'update',
|
||||
data: {
|
||||
style,
|
||||
|
|
|
|||
|
|
@ -169,9 +169,7 @@ context) {
|
|||
filter: {
|
||||
id: extraFileId,
|
||||
},
|
||||
}, {
|
||||
dontCollect: true,
|
||||
});
|
||||
}, {});
|
||||
closeRootMode();
|
||||
}
|
||||
catch (err) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ const uuid_1 = require("oak-domain/lib/utils/uuid");
|
|||
async function updateConfig(params, context) {
|
||||
const { entity, entityId, config } = params;
|
||||
await context.operate(entity, {
|
||||
id: (0, uuid_1.generateNewId)(),
|
||||
id: await (0, uuid_1.generateNewIdAsync)(),
|
||||
action: 'update',
|
||||
data: {
|
||||
config,
|
||||
|
|
@ -19,7 +19,7 @@ exports.updateConfig = updateConfig;
|
|||
async function updateApplicationConfig(params, context) {
|
||||
const { entity, entityId, config } = params;
|
||||
await context.operate(entity, {
|
||||
id: (0, uuid_1.generateNewId)(),
|
||||
id: await (0, uuid_1.generateNewIdAsync)(),
|
||||
action: 'update',
|
||||
data: {
|
||||
config,
|
||||
|
|
@ -33,7 +33,7 @@ exports.updateApplicationConfig = updateApplicationConfig;
|
|||
async function updateStyle(params, context) {
|
||||
const { entity, entityId, style } = params;
|
||||
await context.operate(entity, {
|
||||
id: (0, uuid_1.generateNewId)(),
|
||||
id: await (0, uuid_1.generateNewIdAsync)(),
|
||||
action: 'update',
|
||||
data: {
|
||||
style,
|
||||
|
|
|
|||
|
|
@ -271,9 +271,7 @@ export async function uploadWechatMedia<ED extends EntityDict>(
|
|||
id: extraFileId,
|
||||
},
|
||||
},
|
||||
{
|
||||
dontCollect: true,
|
||||
}
|
||||
{}
|
||||
);
|
||||
closeRootMode();
|
||||
} catch (err) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { generateNewId } from 'oak-domain/lib/utils/uuid';
|
||||
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||
import { EntityDict } from '../oak-app-domain';
|
||||
import { Config } from '../types/Config';
|
||||
import { Style } from '../types/Style';
|
||||
|
|
@ -11,7 +11,7 @@ export async function updateConfig<ED extends EntityDict>(params: {
|
|||
}, context: BRC<ED>) {
|
||||
const { entity, entityId, config } = params;
|
||||
await context.operate(entity, {
|
||||
id: generateNewId(),
|
||||
id: await generateNewIdAsync(),
|
||||
action: 'update',
|
||||
data: {
|
||||
config,
|
||||
|
|
@ -35,7 +35,7 @@ export async function updateApplicationConfig<ED extends EntityDict>(
|
|||
await context.operate(
|
||||
entity,
|
||||
{
|
||||
id: generateNewId(),
|
||||
id: await generateNewIdAsync(),
|
||||
action: 'update',
|
||||
data: {
|
||||
config,
|
||||
|
|
@ -60,7 +60,7 @@ export async function updateStyle<ED extends EntityDict>(
|
|||
await context.operate(
|
||||
entity,
|
||||
{
|
||||
id: generateNewId(),
|
||||
id: await generateNewIdAsync(),
|
||||
action: 'update',
|
||||
data: {
|
||||
style,
|
||||
|
|
|
|||
Loading…
Reference in New Issue