mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-12 13:46:39 +00:00
fix try catch in supporter keys
This commit is contained in:
@@ -245,9 +245,7 @@ export class Config {
|
||||
: "false";
|
||||
process.env.DASHBOARD_URL = parsedConfig.data.app.dashboard_url;
|
||||
|
||||
this.checkSupporterKey().catch((error) => {
|
||||
console.error("Error checking supporter key:", error);
|
||||
});
|
||||
this.checkSupporterKey();
|
||||
|
||||
this.rawConfig = parsedConfig.data;
|
||||
}
|
||||
@@ -295,6 +293,7 @@ export class Config {
|
||||
|
||||
const { key: licenseKey, githubUsername } = key;
|
||||
|
||||
try {
|
||||
const response = await fetch(
|
||||
"https://api.dev.fossorial.io/api/v1/license/validate",
|
||||
{
|
||||
@@ -339,6 +338,10 @@ export class Config {
|
||||
valid: true
|
||||
})
|
||||
.where(eq(supporterKey.keyId, key.keyId));
|
||||
} catch (e) {
|
||||
this.supporterData = key;
|
||||
console.error("Failed to validate supporter key", e);
|
||||
}
|
||||
}
|
||||
|
||||
public getSupporterData() {
|
||||
|
||||
Reference in New Issue
Block a user