diff options
| author | 2024-08-02 13:41:46 +0200 | |
|---|---|---|
| committer | 2024-08-02 12:41:46 +0100 | |
| commit | 7b5917d6ae48f83c92f92d7277960cfa6ae8ec56 (patch) | |
| tree | 93ee6999195060714f41f9b9476d4d76ad50520c /web/source/settings/lib/query/user | |
| parent | [chore] Take account of rotation data when calculating full size image dimens... (diff) | |
| download | gotosocial-7b5917d6ae48f83c92f92d7277960cfa6ae8ec56.tar.xz | |
[feature] Allow import of following and blocks via CSV (#3150)
* [feature] Import follows + blocks via settings panel
* test import follows
Diffstat (limited to 'web/source/settings/lib/query/user')
| -rw-r--r-- | web/source/settings/lib/query/user/export-import.ts | 11 | 
1 files changed, 11 insertions, 0 deletions
diff --git a/web/source/settings/lib/query/user/export-import.ts b/web/source/settings/lib/query/user/export-import.ts index 56c48e364..006203a68 100644 --- a/web/source/settings/lib/query/user/export-import.ts +++ b/web/source/settings/lib/query/user/export-import.ts @@ -125,6 +125,16 @@ const extended = gtsApi.injectEndpoints({  				return { data: null };  			}  		}), + +		importData: build.mutation({ +			query: (formData) => ({ +				method: "POST", +				url: `/api/v1/import`, +				asForm: true, +				body: formData, +				discardEmpty: true +			}), +		}),  	})  }); @@ -135,4 +145,5 @@ export const {  	useExportListsMutation,  	useExportBlocksMutation,  	useExportMutesMutation, +	useImportDataMutation,  } = extended;  | 
