perf: add database indexes, implement caching, enforce permission guards, and sanitize external URLs
Build and Push Multi-Platform Images / build-and-push (push) Successful in 48s
Build and Push Multi-Platform Images / build-and-push (push) Successful in 48s
This commit is contained in:
1 parent
351938aa5c
commit
aa4c181b0c
14 files changed
+94
-40
No files matched your search
@@ -327,14 +327,11 @@ export class SettingsController {
|
||||
const settings = await this.corrSettingRepo.find();
|
||||
const settingsMap = new Map(settings.map(s => [s.CorrespondentId, s]));
|
||||
|
||||
for (const pc of paperlessCorrs) {
|
||||
if (!settingsMap.has(pc.id)) {
|
||||
const newSetting = this.corrSettingRepo.create({
|
||||
CorrespondentId: pc.id,
|
||||
AgrarmonitorId: null,
|
||||
});
|
||||
await this.corrSettingRepo.save(newSetting);
|
||||
}
|
||||
const newSettings = paperlessCorrs
|
||||
.filter((pc: any) => !settingsMap.has(pc.id))
|
||||
.map((pc: any) => this.corrSettingRepo.create({ CorrespondentId: pc.id, AgrarmonitorId: null }));
|
||||
if (newSettings.length > 0) {
|
||||
await this.corrSettingRepo.insert(newSettings);
|
||||
}
|
||||
|
||||
// Re-fetch merged
|
||||
|
||||
Reference in new issue
Block a user