Skip to content

Commit

Permalink
[fix] 3 detail bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Sep 17, 2023
1 parent 2dc9f81 commit 8fbe12a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

### Production environment

https://service.kaiyuanshe.cn/docs/
- Entry: https://service.kaiyuanshe.cn/
- Document: https://service.kaiyuanshe.cn/docs/
- Schema: https://service.kaiyuanshe.cn/docs/spec/

### Type package

Expand Down
3 changes: 2 additions & 1 deletion src/controller/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import type {} from 'koa2-swagger-ui';
import { createAPI } from 'koagger';

import { isProduct } from '../utility';
import { CheckEventController } from './CheckEvent';
import { CrawlerController } from './Crawler';
import { SessionController } from './Session';

export const { router, swagger, mocker } = createAPI({
mock: true,
mock: !isProduct,
controllers: [SessionController, CheckEventController, CrawlerController]
});
8 changes: 6 additions & 2 deletions src/model/Base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ import {
Min
} from 'class-validator';
import { NewData } from 'mobx-restful';
import { CreateDateColumn, PrimaryGeneratedColumn } from 'typeorm';
import {
CreateDateColumn,
PrimaryGeneratedColumn,
UpdateDateColumn
} from 'typeorm';

export abstract class Base {
@IsInt()
Expand All @@ -20,7 +24,7 @@ export abstract class Base {

@IsDateString()
@IsOptional()
@CreateDateColumn()
@UpdateDateColumn()
updatedAt?: string;
}

Expand Down

0 comments on commit 8fbe12a

Please sign in to comment.