vona-module-a-mail 5.0.1 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -88,6 +88,7 @@ declare module 'vona-module-a-mail' {
88
88
  count<T extends IModelSelectCountParams<EntityMail, ModelMail, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<BigNumber | undefined>;
89
89
  aggregate<T extends IModelSelectAggrParams<EntityMail, ModelMail, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelAggrRelationResult<T>>;
90
90
  group<T extends IModelSelectGroupParams<EntityMail, ModelMail, ModelJoins>, ModelJoins extends TypeModelsClassLikeGeneral | undefined = undefined>(params?: T, options?: IModelMethodOptions, modelJoins?: ModelJoins): Promise<TypeModelGroupRelationResult<EntityMail, T>[]>;
91
+ getById<T extends IModelGetOptions<EntityMail, ModelMail>>(id: TableIdentity, options?: T): Promise<TypeModelRelationResult<EntityMail, ModelMail, T> | undefined>;
91
92
  }
92
93
  }
93
94
  declare module 'vona-module-a-orm' {
package/dist/index.js CHANGED
@@ -91,13 +91,13 @@ let BeanMail = (_dec$4 = Bean(), _dec2$4 = BeanInfo({
91
91
  message: mail
92
92
  });
93
93
  if (this.app.meta.isTest) {
94
- this.ctx.commit(async () => {
94
+ await this.ctx.db.commit(async () => {
95
95
  await this.scope.queue.mail.pushAsync({
96
96
  mailId: mailNew.id
97
97
  });
98
98
  });
99
99
  } else {
100
- this.ctx.commit(() => {
100
+ this.ctx.db.commit(() => {
101
101
  this.scope.queue.mail.push({
102
102
  mailId: mailNew.id
103
103
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-a-mail",
3
3
  "type": "module",
4
- "version": "5.0.1",
4
+ "version": "5.0.3",
5
5
  "title": "a-mail",
6
6
  "vonaModule": {
7
7
  "fileVersion": 1,