[feature/frogend] modify local emoji (#1143)

* update danger button red

* emoji category and image modification

* debug bundles in dev

* fix linting error
This commit is contained in:
f0x52
2022-11-25 15:49:48 +01:00
committed by GitHub
parent b6dbe21026
commit 665d902fd7
11 changed files with 322 additions and 82 deletions

View File

@ -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",