From 6cf66e67c057115967537d0ad1325e36ea83e88e Mon Sep 17 00:00:00 2001 From: cvermand <33010418+bidoubiwa@users.noreply.github.com> Date: Mon, 4 Jul 2022 18:33:18 +0200 Subject: [PATCH] Add strapi agent to client agents (#455) * 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 --- server/services/meilisearch/client.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/services/meilisearch/client.js b/server/services/meilisearch/client.js index bc38bdd0..2bd23adb 100644 --- a/server/services/meilisearch/client.js +++ b/server/services/meilisearch/client.js @@ -1,5 +1,6 @@ 'use strict' const { MeiliSearch: Meilisearch } = require('meilisearch') +const packageJson = require('../../../package.json') /** * Create a Meilisearch client instance. @@ -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}`, + ], + })