Skip to content

Commit e1fa426

Browse files
committed
fix: copy snapshot fields when forking a config
1 parent cb24768 commit e1fa426

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/routes/[username]/[slug]/+page.svelte

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,17 @@
6464
const forkResponse = await fetch('/api/configs', {
6565
method: 'POST',
6666
headers: { 'Content-Type': 'application/json' },
67-
body: JSON.stringify({
68-
name: `${data.config.name} (fork)`,
69-
description: `Forked from @${data.configUser.username}`,
70-
base_preset: data.config.base_preset,
71-
packages: data.config.packages,
72-
is_public: true,
73-
custom_script: data.config.custom_script || '',
74-
dotfiles_repo: data.config.dotfiles_repo || ''
75-
})
67+
body: JSON.stringify({
68+
name: `${data.config.name} (fork)`,
69+
description: `Forked from @${data.configUser.username}`,
70+
base_preset: data.config.base_preset,
71+
packages: data.config.packages,
72+
is_public: true,
73+
custom_script: data.config.custom_script || '',
74+
dotfiles_repo: data.config.dotfiles_repo || '',
75+
snapshot: data.config.snapshot || null,
76+
snapshot_at: data.config.snapshot_at || null
77+
})
7678
});
7779
7880
if (!forkResponse.ok) {

0 commit comments

Comments
 (0)