diff --git a/.env.example b/.env.example index c5fe901..eb55f22 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ -DOMAIN = "MY_DOMAIN" +SUBDOMAIN = "MY_SUBDOMAIN" APPID = "APP_ID" APITOKEN = "MY_API_TOKEN_WITH_GET_PERMISSIONS" \ No newline at end of file diff --git a/backend/server.js b/backend/server.js index b11553f..4758c22 100644 --- a/backend/server.js +++ b/backend/server.js @@ -10,7 +10,7 @@ dotenv.config({ path: '../.env' }) ViteExpress.config({ mode: "production" }) // Get Kintone credentials from a .env file -const domain = process.env.DOMAIN; +const subdomain = process.env.SUBDOMAIN; const appID = process.env.APPID; const apiToken = process.env.APITOKEN; @@ -24,7 +24,7 @@ const corsOptions = { }; // Kintone's records endpoint -const multipleRecordsEndpoint = `https://${domain}.cybozu.com/k/v1/records.json?app=${appID}` +const multipleRecordsEndpoint = `https://${subdomain}.cybozu.com/k/v1/records.json?app=${appID}` // GET data from our Kintone database app.get('/getData', cors(corsOptions), async (req, res) => {