@galadrim/galadmin 0.1.211 → 0.1.212
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +2 -1
- package/dist/api.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/api.ts +2 -1
package/package.json
CHANGED
package/src/api.ts
CHANGED
|
@@ -923,13 +923,14 @@ export default (db, config, user) => {
|
|
|
923
923
|
if (!config.inseeKey) {
|
|
924
924
|
return res.status(403).send("inseeKey is not set in the config")
|
|
925
925
|
}
|
|
926
|
+
const processedQuery = (req.query.query as any).replaceAll(" ", "-")
|
|
926
927
|
const response = await axios.get(`https://api.insee.fr/entreprises/sirene/siret`, {
|
|
927
928
|
headers: {
|
|
928
929
|
"Authorization": `Bearer ${config.inseeKey}`,
|
|
929
930
|
"Accept": "application/json"
|
|
930
931
|
},
|
|
931
932
|
params: {
|
|
932
|
-
q: `denominationUniteLegale:${
|
|
933
|
+
q: `denominationUniteLegale:${processedQuery}* OR siren:${processedQuery}*`,
|
|
933
934
|
nombre: 100
|
|
934
935
|
}
|
|
935
936
|
});
|