Fix: Display all SSL up to 200 records

- The SSL certs table in the SSL & Domain dashboard was not displaying all certs records
This commit is contained in:
Tola Leng
2025-07-15 16:21:56 +07:00
parent 6512d4974a
commit f235043417
5 changed files with 16 additions and 46 deletions
@@ -112,10 +112,10 @@ export const deleteSSLCertificate = async (id: string): Promise<boolean> => {
*/
export const refreshAllCertificates = async (): Promise<{ success: number; failed: number }> => {
try {
const response = await pb.collection("ssl_certificates").getList(1, 100);
const response = await pb.collection("ssl_certificates").getList(1, 200);
const certificates = response.items as unknown as SSLCertificate[];
console.log(`Refreshing ${certificates.length} certificates...`);
// console.log(`Refreshing ${certificates.length} certificates...`);
let success = 0;
let failed = 0;
@@ -125,14 +125,14 @@ export const refreshAllCertificates = async (): Promise<{ success: number; faile
await checkCertificateAndNotify(cert);
success++;
} catch (error) {
console.error(`Failed to refresh certificate ${cert.domain}:`, error);
// console.error(`Failed to refresh certificate ${cert.domain}:`, error);
failed++;
}
}
return { success, failed };
} catch (error) {
console.error("Error refreshing certificates:", error);
// console.error("Error refreshing certificates:", error);
throw error;
}
};