Skip to content

Commit

Permalink
Add strapi agent to client agents (#455)
Browse files Browse the repository at this point in the history
* Update meilisearch-js with beta version compatible with v0.28.0rc1 of Meilisearch

* Update indexes and tasks routes for v0.28.0

* Add strapi agent to client agents
  • Loading branch information
bidoubiwa authored Jul 4, 2022
1 parent 585d738 commit 6cf66e6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion server/services/meilisearch/client.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict'
const { MeiliSearch: Meilisearch } = require('meilisearch')
const packageJson = require('../../../package.json')

/**
* Create a Meilisearch client instance.
Expand All @@ -8,4 +9,10 @@ const { MeiliSearch: Meilisearch } = require('meilisearch')
*
* @returns { object } - Meilisearch client instance.
*/
module.exports = config => new Meilisearch(config)
module.exports = config =>
new Meilisearch({
...config,
clientAgents: [
`Meilisearch strapi-plugin-meilisearch ${packageJson.version}`,
],
})

0 comments on commit 6cf66e6

Please sign in to comment.