mirror of
https://github.com/NohamR/lanyard-profile-readme.git
synced 2026-05-26 04:17:19 +00:00
Changing settings so it works when redis is down.
This commit is contained in:
@@ -98,7 +98,10 @@ export default function Home({ userCount }: { userCount: number }) {
|
||||
}
|
||||
|
||||
export async function getServerSideProps(ctx: any) {
|
||||
let userCount = await axios.get("https://lanyard.cnrad.dev/api/getUserCount").then(res => res.data.count);
|
||||
let userCount = await axios
|
||||
.get("https://lanyard.cnrad.dev/api/getUserCount", { timeout: 1000 })
|
||||
.then(res => res.data.count)
|
||||
.catch(() => 0);
|
||||
|
||||
return {
|
||||
props: { userCount },
|
||||
|
||||
Reference in New Issue
Block a user