forked from Yara724/api
dynamic locations
This commit is contained in:
@@ -20,7 +20,7 @@ import {
|
||||
* through the sync helpers in fanavaran-client.config.ts.
|
||||
*
|
||||
* Boot behaviour: for each known client key, if no document exists, insert the
|
||||
* seed profile. Existing documents are never overwritten (ops can edit Mongo).
|
||||
* seed profile. Existing documents retain ops edits except known legacy defaults.
|
||||
*/
|
||||
@Injectable()
|
||||
export class FanavaranClientConfigService implements OnModuleInit {
|
||||
@@ -38,6 +38,12 @@ export class FanavaranClientConfigService implements OnModuleInit {
|
||||
}
|
||||
|
||||
async seedMissingProfiles(): Promise<void> {
|
||||
// Moallem previously inherited the shared file type 23. Correct that legacy
|
||||
// default on existing deployments while preserving other configured ids.
|
||||
await this.configModel.updateOne(
|
||||
{ key: "moallem", "defaults.ClaimFileTypeId": 23 },
|
||||
{ $set: { "defaults.ClaimFileTypeId": 17 } },
|
||||
);
|
||||
for (const key of FANAVARAN_CLIENT_KEYS) {
|
||||
const seed = SEED_FANAVARAN_CLIENT_PROFILES[key];
|
||||
const existing = await this.configModel
|
||||
|
||||
Reference in New Issue
Block a user