重构代码, 移除一些warning
This commit is contained in:
parent
f51fcc00d4
commit
5c4cecd820
@ -186,7 +186,6 @@ interface Number {
|
|||||||
* @param {number} min
|
* @param {number} min
|
||||||
* @param {number} max
|
* @param {number} max
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
* @memberof Number
|
|
||||||
*/
|
*/
|
||||||
between?(min: number, max: number): boolean;
|
between?(min: number, max: number): boolean;
|
||||||
}
|
}
|
||||||
@ -207,7 +206,6 @@ interface String {
|
|||||||
/**
|
/**
|
||||||
* 替换字符串中{0}{1}{2}{a} {b}这样的数据,用obj对应key替换,或者是数组中对应key的数据替换
|
* 替换字符串中{0}{1}{2}{a} {b}这样的数据,用obj对应key替换,或者是数组中对应key的数据替换
|
||||||
*/
|
*/
|
||||||
substitute?(...args: any): string;
|
|
||||||
substitute?(args: any[]): string;
|
substitute?(args: any[]): string;
|
||||||
/**
|
/**
|
||||||
* 对数字进行补0操作
|
* 对数字进行补0操作
|
||||||
|
@ -39,11 +39,11 @@ export class FileServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private registerRouter() {
|
private registerRouter() {
|
||||||
logger.log('register api routers');
|
logger.log('register file routers');
|
||||||
let self = this;
|
let self = this;
|
||||||
for (let [controller, config] of RouterMap.decoratedRouters) {
|
for (let [controller, config] of RouterMap.decoratedRouters) {
|
||||||
for(let data of config.data) {
|
for(let data of config.data) {
|
||||||
logger.info('find api router', data.method || 'all',
|
logger.info('find file router', data.method || 'all',
|
||||||
data.path, controller.name);
|
data.path, controller.name);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
self.server[data.method || 'all'](data.path, {
|
self.server[data.method || 'all'](data.path, {
|
||||||
|
@ -14,6 +14,9 @@ declare module 'fastify' {
|
|||||||
user?: any,
|
user?: any,
|
||||||
token?: string
|
token?: string
|
||||||
}
|
}
|
||||||
|
interface FastifyInstance {
|
||||||
|
apiAuth: (request: FastifyRequest, reply: FastifyReply) => {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ApiAuthOptions {
|
export interface ApiAuthOptions {
|
||||||
|
@ -15,6 +15,9 @@ declare module 'fastify' {
|
|||||||
interface FastifyRequest {
|
interface FastifyRequest {
|
||||||
jwtVerify: Function;
|
jwtVerify: Function;
|
||||||
}
|
}
|
||||||
|
interface FastifyInstance {
|
||||||
|
zAuth: (request: FastifyRequest, reply: FastifyReply) => {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const zAuthPlugin: FastifyPluginAsync = async function (
|
const zAuthPlugin: FastifyPluginAsync = async function (
|
||||||
|
@ -11,16 +11,10 @@ import { BaseConst } from '../constants/BaseConst'
|
|||||||
import { QCategoryCache } from './QCategoryCache'
|
import { QCategoryCache } from './QCategoryCache'
|
||||||
import { PuzzleSession } from '../models/match/PuzzleSession'
|
import { PuzzleSession } from '../models/match/PuzzleSession'
|
||||||
import { GameEnv } from '../config/GameEnv'
|
import { GameEnv } from '../config/GameEnv'
|
||||||
import { PuzzleRank } from '../models/match/PuzzleRank'
|
|
||||||
import { Shop } from '../models/shop/Shop'
|
import { Shop } from '../models/shop/Shop'
|
||||||
import { mission_vo } from '../config/parsers/mission_vo'
|
import { mission_vo } from '../config/parsers/mission_vo'
|
||||||
import { ShopActivity } from '../models/shop/ShopActivity'
|
import { ShopActivity } from '../models/shop/ShopActivity'
|
||||||
import {
|
import { getAccountRank, getRankList, updateRank } from './Rank'
|
||||||
getAccountRank,
|
|
||||||
getAccountScore,
|
|
||||||
getRankList,
|
|
||||||
updateRank
|
|
||||||
} from './Rank'
|
|
||||||
|
|
||||||
|
|
||||||
export function transformRecord(records: any[]) {
|
export function transformRecord(records: any[]) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user