diff --git a/.env b/.env index 55e02a9..2c29ab4 100644 --- a/.env +++ b/.env @@ -1,10 +1 @@ - - -# This was inserted by `prisma init`: -# Environment variables declared in this file are automatically made available to Prisma. -# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema - -# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. -# See the documentation for all the connection string options: https://pris.ly/d/connection-strings - # DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 737660b..8b3501e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts .task +.env \ No newline at end of file diff --git a/src/app/api/apiDcp.js b/src/app/api/apiDcp.js index 4487185..45befdd 100644 --- a/src/app/api/apiDcp.js +++ b/src/app/api/apiDcp.js @@ -1,7 +1,7 @@ // import axios from 'axios' const getListAPI = async (direction) => { try { - const response = await axios.get('https://server.cdpolyclinic.ru/api/doctor/getFullList') + const response = await axios.get(process.env.GET_LIST_API) if (response.status === 200) { if (response.data.length >= 0) { const listDoctorsDirection = [] @@ -26,7 +26,7 @@ const sendRequestCallAPI = async (name, phoneNumber, date) => { telephone: phoneNumber, date }, - url: 'https://server.cdpolyclinic.ru/api/request/setRequest' + url: process.env.SET_REQUEST_CALL } await axios(options).then((res) => { return res.data @@ -44,7 +44,7 @@ const sendMessageAPI = async (name, phoneNumber, email, message, date) => { telephone: phoneNumber, date }, - url: 'https://server.cdpolyclinic.ru/api/message/setMessage' + url: process.env.SET_MESSAGE_API } await axios(options).then((res) => { return res.data