File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ yarn-error.log*
2828
2929# local env files
3030.env * .local
31+ .env
3132
3233# vercel
3334.vercel
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export default async function handler(
2323 } ) ;
2424
2525 return res . status ( 200 ) . json ( {
26- total : views . count ,
26+ total : Number ( views . count ) ,
2727 } ) ;
2828 }
2929
@@ -34,7 +34,7 @@ export default async function handler(
3434 } ,
3535 } ) ;
3636
37- return res . status ( 200 ) . json ( { total : views ?. count } ) ;
37+ return res . status ( 200 ) . json ( { total : Number ( views ?. count ?? 0 ) } ) ;
3838 }
3939 } catch {
4040 return res . status ( 500 ) . json ( {
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default async function handler(
1515 } ,
1616 } ) ;
1717
18- return res . status ( 200 ) . json ( { total : count } ) ;
18+ return res . status ( 200 ) . json ( { total : Number ( count ?? 0 ) } ) ;
1919 } catch {
2020 return res . status ( 500 ) . json ( {
2121 error : {
You can’t perform that action at this time.
0 commit comments