diff options
| author | 2022-11-25 15:49:48 +0100 | |
|---|---|---|
| committer | 2022-11-25 15:49:48 +0100 | |
| commit | 665d902fd72ef4fffb273502b6f010a94a47e15b (patch) | |
| tree | 8fb9eb7aec5cad2ccf96ae1ebe276f18ad0735c0 /web/source/settings/lib | |
| parent | [feature] `PATCH /api/v1/admin/custom_emojis/{id}` endpoint (#1061) (diff) | |
| download | gotosocial-665d902fd72ef4fffb273502b6f010a94a47e15b.tar.xz | |
[feature/frogend] modify local emoji (#1143)
* update danger button red
* emoji category and image modification
* debug bundles in dev
* fix linting error
Diffstat (limited to 'web/source/settings/lib')
| -rw-r--r-- | web/source/settings/lib/query/custom-emoji.js | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/web/source/settings/lib/query/custom-emoji.js b/web/source/settings/lib/query/custom-emoji.js index a26da75ca..fa2a08db6 100644 --- a/web/source/settings/lib/query/custom-emoji.js +++ b/web/source/settings/lib/query/custom-emoji.js @@ -54,6 +54,23 @@ const endpoints = (build) => ({  				? [{type: "Emojis", id: "LIST"}, {type: "Emojis", id: res.id}]  				: [{type: "Emojis", id: "LIST"}]  	}), +	editEmoji: build.mutation({ +		query: ({id, ...patch}) => { +			return { +				method: "PATCH", +				url: `/api/v1/admin/custom_emojis/${id}`, +				asForm: true, +				body: { +					type: "modify", +					...patch +				} +			}; +		}, +		invalidatesTags: (res) =>  +			res +				? [{type: "Emojis", id: "LIST"}, {type: "Emojis", id: res.id}] +				: [{type: "Emojis", id: "LIST"}] +	}),  	deleteEmoji: build.mutation({  		query: (id) => ({  			method: "DELETE",  | 
