调整
This commit is contained in:
parent
e88c39c0f1
commit
853916895d
@ -7,12 +7,12 @@ export class HotTopController{
|
|||||||
async all(request: Request, response: Response, next: NextFunction){
|
async all(request: Request, response: Response, next: NextFunction){
|
||||||
const nowDate = new Date()
|
const nowDate = new Date()
|
||||||
const yestDay = new Date()
|
const yestDay = new Date()
|
||||||
yestDay.setDate(yestDay.getDate()-1)
|
yestDay.setHours(nowDate.getHours()-3)
|
||||||
// console.log(nowDate.toLocaleString())
|
// console.log(nowDate.toLocaleString())
|
||||||
let num:number
|
let num:number
|
||||||
if(request.params.num) num = parseInt(request.params.num)
|
if(request.params.num) num = parseInt(request.params.num)
|
||||||
// console.log(id)
|
// console.log(id)
|
||||||
if(isNaN(num) || num>50) num = 50
|
if(isNaN(num) || num>50) num = 15
|
||||||
// return "OK"
|
// return "OK"
|
||||||
return this.TimesRepository
|
return this.TimesRepository
|
||||||
.createQueryBuilder("time")
|
.createQueryBuilder("time")
|
||||||
|
Loading…
Reference in New Issue
Block a user