Skip to content

Commit 9aea10a

Browse files
committed
Make function naming more consistent
1 parent 5016f0a commit 9aea10a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

admin/src/components/Collections.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const Collections = ({ updateCredentials }) => {
5454
}
5555
}
5656

57-
const addCollectionToMeiliSearch = async ({ name: collection }) => {
57+
const addCollection = async ({ name: collection }) => {
5858
const update = await request(`/${pluginId}/collections/${collection}/`, {
5959
method: 'POST'
6060
})
@@ -70,7 +70,7 @@ const Collections = ({ updateCredentials }) => {
7070
}
7171
}
7272

73-
const updateCollectionsInMeiliSearch = async ({ collection }) => {
73+
const updateCollections = async ({ collection }) => {
7474
try {
7575
const update = await request(`/${pluginId}/collections/${collection}/`, {
7676
method: 'PUT'
@@ -100,7 +100,7 @@ const Collections = ({ updateCredentials }) => {
100100

101101
const addOrRemoveCollection = async (row) => {
102102
if (row._isChecked) await removeCollection(row)
103-
else await addCollectionToMeiliSearch(row)
103+
else await addCollection(row)
104104
setUpdatedCollections(false)
105105
}
106106

@@ -176,7 +176,7 @@ const Collections = ({ updateCredentials }) => {
176176
{
177177
icon: <UpdateButton forwardedAs='span'>Update</UpdateButton>,
178178
onClick: data => {
179-
updateCollectionsInMeiliSearch({ collection: data.name })
179+
updateCollections({ collection: data.name })
180180
}
181181
}
182182
]}

0 commit comments

Comments
 (0)