chore: fix lint and add gateway auth tests
This commit is contained in:
@@ -508,7 +508,9 @@ describe("legacy config detection", () => {
|
||||
const res = migrateLegacyConfig({
|
||||
routing: { allowFrom: ["+15555550123"] },
|
||||
});
|
||||
expect(res.changes).toContain("Moved routing.allowFrom → whatsapp.allowFrom.");
|
||||
expect(res.changes).toContain(
|
||||
"Moved routing.allowFrom → whatsapp.allowFrom.",
|
||||
);
|
||||
expect(res.config?.whatsapp?.allowFrom).toEqual(["+15555550123"]);
|
||||
expect(res.config?.routing?.allowFrom).toBeUndefined();
|
||||
});
|
||||
|
||||
@@ -1217,7 +1217,9 @@ const LEGACY_CONFIG_MIGRATIONS: LegacyConfigMigration[] = [
|
||||
whatsapp.allowFrom = allowFrom;
|
||||
changes.push("Moved routing.allowFrom → whatsapp.allowFrom.");
|
||||
} else {
|
||||
changes.push("Removed routing.allowFrom (whatsapp.allowFrom already set).");
|
||||
changes.push(
|
||||
"Removed routing.allowFrom (whatsapp.allowFrom already set).",
|
||||
);
|
||||
}
|
||||
|
||||
delete (routing as Record<string, unknown>).allowFrom;
|
||||
|
||||
Reference in New Issue
Block a user