This commit is contained in:
ZtRXR 2023-09-01 22:53:38 +08:00
parent e88c39c0f1
commit 853916895d

View File

@ -7,12 +7,12 @@ export class HotTopController{
async all(request: Request, response: Response, next: NextFunction){
const nowDate = new Date()
const yestDay = new Date()
yestDay.setDate(yestDay.getDate()-1)
yestDay.setHours(nowDate.getHours()-3)
// console.log(nowDate.toLocaleString())
let num:number
if(request.params.num) num = parseInt(request.params.num)
// console.log(id)
if(isNaN(num) || num>50) num = 50
if(isNaN(num) || num>50) num = 15
// return "OK"
return this.TimesRepository
.createQueryBuilder("time")