feat: add isExistingRepository flag to repository configs for import compatibility
This commit is contained in:
parent
ce714f7bfc
commit
4090d5caa6
1 changed files with 10 additions and 1 deletions
|
|
@ -224,12 +224,21 @@ export const configExportController = new Hono()
|
|||
params,
|
||||
);
|
||||
|
||||
const [exportVolumes, exportRepositories, exportNotifications] = await Promise.all([
|
||||
const [exportVolumes, exportRepositoriesRaw, exportNotifications] = await Promise.all([
|
||||
exportEntities(volumes, params),
|
||||
exportEntities(repositories, params),
|
||||
exportEntities(notifications, params),
|
||||
]);
|
||||
|
||||
// Add isExistingRepository flag to all repository configs for import compatibility
|
||||
const exportRepositories = exportRepositoriesRaw.map((repo) => ({
|
||||
...repo,
|
||||
config:
|
||||
repo.config && typeof repo.config === "object"
|
||||
? { ...(repo.config as Record<string, unknown>), isExistingRepository: true }
|
||||
: repo.config,
|
||||
}));
|
||||
|
||||
let recoveryKey: string | undefined;
|
||||
if (includeRecoveryKey) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue