Skip to content

Commit 13ee298

Browse files
committed
fix: minor bug update package
1 parent d16463e commit 13ee298

File tree

8 files changed

+30
-36
lines changed

8 files changed

+30
-36
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"eslint.alwaysShowStatus": true,
33
"editor.codeActionsOnSave": {
4-
"source.fixAll.eslint": true
4+
"source.fixAll.eslint": "explicit"
55
}
66
}

src/app/controller/upload.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { type NextFunction, type Request, type Response } from 'express'
22
import { arrayFormatter, deleteFile } from 'expresso-core'
33
import { useMulter } from 'expresso-hooks'
4-
import { type FileAttributes } from 'expresso-provider/lib/interface'
4+
import { FileAttributes } from 'expresso-provider/lib/storage/types'
55
import _ from 'lodash'
66
import { env } from '~/config/env'
77
import ConstRole from '~/core/constants/ConstRole'

src/app/interface/Upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type FileAttributes } from 'expresso-provider/lib/interface'
1+
import { FileAttributes } from 'expresso-provider/lib/storage/types'
22

33
export interface UploadFileEntity {
44
fieldUpload: FileAttributes

src/app/service/auth.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { validateEmpty } from 'expresso-core'
22
import { useToken } from 'expresso-hooks'
3-
import { type ExpiresType } from 'expresso-hooks/lib/token/interface'
3+
import { ExpiresType } from 'expresso-hooks/lib/token/types'
44
import { type TOptions } from 'i18next'
55
import _ from 'lodash'
66
import { v4 as uuidv4 } from 'uuid'
@@ -11,9 +11,9 @@ import { type IReqOptions } from '~/core/interface/ReqOptions'
1111
import ResponseError from '~/core/modules/response/ResponseError'
1212
import SendMail from '~/core/utils/sendMails'
1313
import User, {
14-
type UserLoginAttributes,
14+
type UserAttributes,
1515
type LoginAttributes,
16-
UserAttributes,
16+
type UserLoginAttributes,
1717
} from '~/database/entities/User'
1818
import { type DtoLogin } from '../interface/dto/Auth'
1919
import userSchema from '../schema/user.schema'

src/app/service/upload.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { sub } from 'date-fns'
22
import { type Request } from 'express'
33
import { validateBoolean } from 'expresso-core'
4-
import { type TypeMinio } from 'expresso-provider/lib/storage'
4+
import { TypeMinio } from 'expresso-provider/lib/storage/types'
55
import { type TOptions } from 'i18next'
66
import _ from 'lodash'
77
import { Op } from 'sequelize'

src/config/mail.ts

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
import { SMTP } from 'expresso-provider'
2-
import { type MailDriverType } from 'expresso-provider/lib/smtp'
32
import { env } from './env'
43

54
/**
65
* Initialize Mail Service Config
76
*/
8-
export const mailService = new SMTP({
9-
// Your App Name
10-
appName: env.APP_NAME,
11-
12-
// Mail Driver support 'smtp' | 'gmail'
13-
driver: env.MAIL_DRIVER as MailDriverType,
14-
15-
// Mail Host
16-
host: env.MAIL_HOST,
17-
18-
// Mail Port
19-
port: env.MAIL_PORT,
20-
21-
// Mail Username
22-
username: env.MAIL_USERNAME,
23-
24-
// Mail Password
25-
password: env.MAIL_PASSWORD,
26-
})
7+
export const mailService = new SMTP(
8+
{ from: `${env.APP_NAME} <${env.MAIL_USERNAME}>` },
9+
{
10+
service: env.MAIL_DRIVER,
11+
host: env.MAIL_HOST,
12+
port: env.MAIL_PORT,
13+
auth: {
14+
user: env.MAIL_USERNAME,
15+
pass: env.MAIL_PASSWORD,
16+
},
17+
}
18+
)

src/config/storage.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { Storage } from 'expresso-provider'
22
import {
3-
type StorageExpires,
4-
type StorageType,
5-
} from 'expresso-provider/lib/storage'
3+
StorageExpires,
4+
StorageType,
5+
} from 'expresso-provider/lib/storage/types'
66
import { env } from './env'
77

88
/**
@@ -35,10 +35,12 @@ export const storageService = new Storage({
3535

3636
// Storage Options for MinIO
3737
// options: {
38-
// // use this options for MinIO
38+
39+
// use this options for MinIO
3940
// useSSL: true,
4041

41-
// // use this options for Google Cloud Storage ( serviceAccount.json )
42+
// use this options for Google Cloud Storage ( serviceAccount.json )
4243
// filePath: './your_path/serviceAccount.json',
44+
4345
// },
4446
})

src/core/modules/hooks/useQuery.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { useSequelize } from 'expresso-query'
22
import {
3-
type DtoSequelizeQuery,
4-
type IUseSequelizeQuery,
5-
} from 'expresso-query/lib/interface'
3+
DtoSequelizeQuery,
4+
UseQuerySequelize,
5+
} from 'expresso-query/lib/sequelize/types'
66
import { env } from '~/config/env'
77

88
type ConnectType = 'postgres' | 'mysql' | 'mariadb'
@@ -12,7 +12,7 @@ type ConnectType = 'postgres' | 'mysql' | 'mariadb'
1212
* @param params
1313
* @returns
1414
*/
15-
export function useQuery(params: IUseSequelizeQuery): DtoSequelizeQuery {
15+
export function useQuery(params: UseQuerySequelize): DtoSequelizeQuery {
1616
const dialect = env.SEQUELIZE_CONNECTION as ConnectType
1717

1818
return useSequelize.queryBulider(params, { dialect })

0 commit comments

Comments
 (0)