mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +00:00
This commit is contained in:
parent
6773165c72
commit
849097198b
@ -33,9 +33,11 @@ const Votes:NextPage<VotesProps> = ({ data }) => {
|
||||
}
|
||||
export const getServerSideProps = async (ctx:Context) => {
|
||||
let data: BotList
|
||||
console.log(ctx.query.page)
|
||||
if(!ctx.query.page) ctx.query.page = '1'
|
||||
const validate = await PageCount.validate(ctx.query.page).then(el => el).catch(() => null)
|
||||
if(!validate) data = null
|
||||
console.log(validate)
|
||||
if(!validate || isNaN(Number(ctx.query.page))) data = null
|
||||
else data = await Query.get.list.votes.load(Number(ctx.query.page))
|
||||
return {
|
||||
props: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user