koishi-plugin-wordpress-notifier 1.4.0 → 1.5.0

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.
package/lib/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export interface WordPressPost {
29
29
  tags: number[];
30
30
  }
31
31
  export interface WordPressPostRecord {
32
+ id: number;
32
33
  postId: number;
33
34
  pushedAt: Date;
34
35
  }
package/lib/index.js CHANGED
@@ -16,6 +16,7 @@ exports.Config = koishi_1.Schema.object({
16
16
  function apply(ctx, config) {
17
17
  ctx.logger.info('WordPress 推送插件已加载');
18
18
  ctx.model.extend('wordpress_posts', {
19
+ id: 'integer',
19
20
  postId: 'integer',
20
21
  pushedAt: 'timestamp'
21
22
  });
@@ -38,6 +39,7 @@ function apply(ctx, config) {
38
39
  }
39
40
  async function markPostAsPushed(postId) {
40
41
  await ctx.database.create('wordpress_posts', {
42
+ id: postId,
41
43
  postId,
42
44
  pushedAt: new Date()
43
45
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koishi-plugin-wordpress-notifier",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "WordPress 文章自动推送到 QQ",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",