File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ const ListPage: NextPage<PageProps> = ({ data }) => {
171
171
}
172
172
} ;
173
173
174
- const submitHandle : FormEventHandler = useCallback (
174
+ const editHandle : FormEventHandler = useCallback (
175
175
( e ) => {
176
176
( async ( ) => {
177
177
e . preventDefault ( ) ;
@@ -182,7 +182,11 @@ const ListPage: NextPage<PageProps> = ({ data }) => {
182
182
const res = await fetch ( `/api/list/${ encodeURIComponent ( data . id ) } /update` , {
183
183
method : "POST" ,
184
184
body : JSON . stringify ( {
185
- ...data ,
185
+ title : data . title ,
186
+ description : data . description ,
187
+ gameVersion : data . gameVersion ,
188
+ modloader : data . modloader ,
189
+ visibility : data . visibility ,
186
190
mods : resolvedMods . map ( ( elem ) => richModToMod ( elem ) ) ,
187
191
} ) ,
188
192
headers : { "Content-Type" : "application/json" } ,
610
614
{ hasElevatedPermissions && (
611
615
< div className = "mb-16 flex flex-wrap items-center gap-2" >
612
616
{ isEditing ? (
613
- < Button variant = "green" onClick = { submitHandle } disabled = { isSaving } >
617
+ < Button variant = "green" onClick = { editHandle } disabled = { isSaving } >
614
618
{ isSaving ? < Spinner className = "block h-5 w-5" /> : < SaveIcon className = "block h-5 w-5" /> }
615
619
< span > Save</ span >
616
620
</ Button >
You can’t perform that action at this time.
0 commit comments