File tree Expand file tree Collapse file tree 8 files changed +30
-36
lines changed
Expand file tree Collapse file tree 8 files changed +30
-36
lines changed Original file line number Diff line number Diff line change 11{
22 "eslint.alwaysShowStatus" : true ,
33 "editor.codeActionsOnSave" : {
4- "source.fixAll.eslint" : true
4+ "source.fixAll.eslint" : " explicit "
55 }
66}
Original file line number Diff line number Diff line change 11import { type NextFunction , type Request , type Response } from 'express'
22import { arrayFormatter , deleteFile } from 'expresso-core'
33import { useMulter } from 'expresso-hooks'
4- import { type FileAttributes } from 'expresso-provider/lib/interface '
4+ import { FileAttributes } from 'expresso-provider/lib/storage/types '
55import _ from 'lodash'
66import { env } from '~/config/env'
77import ConstRole from '~/core/constants/ConstRole'
Original file line number Diff line number Diff line change 1- import { type FileAttributes } from 'expresso-provider/lib/interface '
1+ import { FileAttributes } from 'expresso-provider/lib/storage/types '
22
33export interface UploadFileEntity {
44 fieldUpload : FileAttributes
Original file line number Diff line number Diff line change 11import { validateEmpty } from 'expresso-core'
22import { useToken } from 'expresso-hooks'
3- import { type ExpiresType } from 'expresso-hooks/lib/token/interface '
3+ import { ExpiresType } from 'expresso-hooks/lib/token/types '
44import { type TOptions } from 'i18next'
55import _ from 'lodash'
66import { v4 as uuidv4 } from 'uuid'
@@ -11,9 +11,9 @@ import { type IReqOptions } from '~/core/interface/ReqOptions'
1111import ResponseError from '~/core/modules/response/ResponseError'
1212import SendMail from '~/core/utils/sendMails'
1313import User , {
14- type UserLoginAttributes ,
14+ type UserAttributes ,
1515 type LoginAttributes ,
16- UserAttributes ,
16+ type UserLoginAttributes ,
1717} from '~/database/entities/User'
1818import { type DtoLogin } from '../interface/dto/Auth'
1919import userSchema from '../schema/user.schema'
Original file line number Diff line number Diff line change 11import { sub } from 'date-fns'
22import { type Request } from 'express'
33import { validateBoolean } from 'expresso-core'
4- import { type TypeMinio } from 'expresso-provider/lib/storage'
4+ import { TypeMinio } from 'expresso-provider/lib/storage/types '
55import { type TOptions } from 'i18next'
66import _ from 'lodash'
77import { Op } from 'sequelize'
Original file line number Diff line number Diff line change 11import { SMTP } from 'expresso-provider'
2- import { type MailDriverType } from 'expresso-provider/lib/smtp'
32import { 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+ )
Original file line number Diff line number Diff line change 11import { Storage } from 'expresso-provider'
22import {
3- type StorageExpires ,
4- type StorageType ,
5- } from 'expresso-provider/lib/storage'
3+ StorageExpires ,
4+ StorageType ,
5+ } from 'expresso-provider/lib/storage/types '
66import { 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} )
Original file line number Diff line number Diff line change 11import { useSequelize } from 'expresso-query'
22import {
3- type DtoSequelizeQuery ,
4- type IUseSequelizeQuery ,
5- } from 'expresso-query/lib/interface '
3+ DtoSequelizeQuery ,
4+ UseQuerySequelize ,
5+ } from 'expresso-query/lib/sequelize/types '
66import { env } from '~/config/env'
77
88type 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 } )
You can’t perform that action at this time.
0 commit comments