Skip to content

Commit c4184ea

Browse files
committed
update paths
1 parent 5995827 commit c4184ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+91
-67
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"koa-logger": "^3.2.0",
4444
"nodemon": "^1.18.4",
4545
"ts-node": "^10.2.0",
46+
"tsconfig-paths": "^4.1.2",
4647
"typescript": "^4.3.5"
4748
}
4849
}

src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// koa
22
import * as Koa from 'koa'
33
import * as KoaLogger from 'koa-logger'
4-
import { Context } from '@core/koa'
4+
import { Context } from '@/core/koa'
55
import Catch from './middlewares/catch'
66
import Middlewares from './middlewares/index'
77
import {connectDB, connectMongo} from './database/conectDB'

src/controllers/AccountController.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as Crypto from 'crypto';
22
import {getManager, getRepository, Like, Equal} from "typeorm";
3-
import { Context } from '@core/koa'
4-
import { User } from '../entities/mysql/user'
5-
import Store from "../utils/session/store";
3+
import { Context } from '@/core/koa'
4+
import { User } from '@/entities/mysql/user'
5+
import Store from "@/utils/session/store";
66
import { JWT_SECRET, EXP_TIME } from '../constants'
77
import { sign } from '../core/jwt/sign'
88
import { cryptoPwd } from "../utils/tools"

src/controllers/ArticleController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Equal, Like, Between, FindManyOptions} from "typeorm";
2-
import { Context } from '@core/koa'
2+
import { Context } from '@/core/koa'
33
import { Article } from '../entities/mysql/article'
44
import { Guid } from "../utils/tools";
55
import { toDate } from 'date-fns'

src/controllers/ArticleTypeController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Like, Between, FindManyOptions} from "typeorm";
2-
import { Context } from '@core/koa'
2+
import { Context } from '@/core/koa'
33
import { ArticleType } from '../entities/mysql/articleType'
44
import { Guid } from "../utils/tools";
55
import { toDate } from 'date-fns'

src/controllers/CommentController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Like, Between, FindManyOptions} from "typeorm";
2-
import { Context } from '@core/koa'
2+
import { Context } from '@/core/koa'
33
import { Comment } from '../entities/mysql/comment'
44
import { Guid } from "../utils/tools";
55
import { toDate } from 'date-fns'

src/controllers/DemoController.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {getMongoManager, getMongoRepository, Like, Between, FindManyOptions, Equal} from "typeorm";
2-
import { Context } from '@core/koa'
2+
import { Context } from '@/core/koa'
33
import { Baidu, Tmall } from "../constants";
4+
import { Delay } from '@/utils/tools'
45

56

67

@@ -26,6 +27,7 @@ export default class LogsController {
2627

2728
static async test(ctx: Context) {
2829
console.log('ctx.path: ', ctx.path.length, ctx.params)
30+
await Delay(5000)
2931
ctx.body = ctx.params.id.length
3032
}
3133

src/controllers/DoubleColorBallController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Equal, Like, Between, FindManyOptions} from "typeorm";
2-
import { Context } from '@core/koa'
2+
import { Context } from '@/core/koa'
33
import { Balls } from '../entities/mysql/balls'
44
import { Guid } from "../utils/tools";
55
import { getBlogManager, getBlogRepository } from '../database/dbUtils';

src/controllers/FileController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Buffer } from 'buffer';
2-
import { Context } from '@core/koa'
2+
import { Context } from '@/core/koa'
33

44
const getFile = (ctx: Context) => {
55

src/controllers/LeaveMessageController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Like, Between, FindManyOptions} from "typeorm";
2-
import { Context } from '@core/koa'
2+
import { Context } from '@/core/koa'
33
import { LeaveMessage } from '../entities/mysql/leaveMessage'
44
import { Guid } from "../utils/tools";
55
import { toDate } from 'date-fns'

0 commit comments

Comments
 (0)