We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4c2c623 + c43a4da commit 9a3f169Copy full SHA for 9a3f169
src/serverFunctions/siret.ts
@@ -2,14 +2,8 @@
2
3
import axios from "axios"
4
import { SiretAPI } from "../types/Siret"
5
-import { auth } from "../services/auth/auth"
6
7
export const getSiretInfo = async (siret: string) => {
8
- const session = await auth()
9
- if (!session || !session.user) {
10
- return "Utilisateur non authentifié"
11
- }
12
-
13
try {
14
const result = await axios.get<SiretAPI>(`https://api.insee.fr/api-sirene/3.11/siret/${siret}`, {
15
headers: { "X-INSEE-Api-Key-Integration": process.env.INSEE_API_KEY },
0 commit comments