mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-11 20:29:02 +00:00
Fix setting limits
This commit is contained in:
@@ -21,29 +21,14 @@ class LimitService {
|
||||
.where(eq(limits.limitId, limitId))
|
||||
.limit(1);
|
||||
|
||||
if (!limit) {
|
||||
logger.warn(
|
||||
`Limit with ID ${limitId} not found for org ${orgId}...`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
// check if its overriden
|
||||
if (limit.override) {
|
||||
if (limit && limit.override) {
|
||||
logger.debug(
|
||||
`Skipping limit ${limitId} for org ${orgId} since it is overridden...`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
// dont write if the value is the same
|
||||
if (limit.value === value) {
|
||||
logger.debug(
|
||||
`Skipping limit ${limitId} for org ${orgId} since the value is the same (${value})...`
|
||||
);
|
||||
continue;
|
||||
}
|
||||
|
||||
await trx
|
||||
.insert(limits)
|
||||
.values({ limitId, orgId, featureId, value, description });
|
||||
|
||||
@@ -125,13 +125,6 @@ export class PrivateConfig {
|
||||
this.rawPrivateConfig.server.reo_client_id;
|
||||
}
|
||||
|
||||
if (this.rawPrivateConfig.stripe?.s3Bucket) {
|
||||
process.env.S3_BUCKET = this.rawPrivateConfig.stripe.s3Bucket;
|
||||
}
|
||||
|
||||
if (this.rawPrivateConfig.stripe?.s3Region) {
|
||||
process.env.S3_REGION = this.rawPrivateConfig.stripe.s3Region;
|
||||
}
|
||||
if (this.rawPrivateConfig.flags.use_pangolin_dns) {
|
||||
process.env.USE_PANGOLIN_DNS =
|
||||
this.rawPrivateConfig.flags.use_pangolin_dns.toString();
|
||||
|
||||
Reference in New Issue
Block a user