Commit ba57ea24 by adarsh

slug added

1 parent f700dfc6
...@@ -18,7 +18,7 @@ module.exports = ({ env }) => ({ ...@@ -18,7 +18,7 @@ module.exports = ({ env }) => ({
port: env.int("DATABASE_PORT", 3306), port: env.int("DATABASE_PORT", 3306),
database: env("DATABASE_NAME", "centralstar"), database: env("DATABASE_NAME", "centralstar"),
user: env("DATABASE_USERNAME", "centralstar"), user: env("DATABASE_USERNAME", "centralstar"),
password: env("DATABASE_PASSWORD", "12345"), password: env("DATABASE_PASSWORD", "Logicloop!123"),
// schema: env("DATABASE_SCHEMA", "public"), // Not required // schema: env("DATABASE_SCHEMA", "public"), // Not required
// ssl: { // ssl: {
// rejectUnauthorized: env.bool("DATABASE_SSL_SELF", false) // rejectUnauthorized: env.bool("DATABASE_SSL_SELF", false)
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
"@strapi/provider-email-nodemailer": "^4.3.8", "@strapi/provider-email-nodemailer": "^4.3.8",
"@strapi/provider-upload-aws-s3": "^4.3.9", "@strapi/provider-upload-aws-s3": "^4.3.9",
"@strapi/strapi": "4.3.6", "@strapi/strapi": "4.3.6",
"axios": "^1.1.3",
"better-sqlite3": "7.4.6", "better-sqlite3": "7.4.6",
"mysql": "^2.18.1", "mysql": "^2.18.1",
"pg": "^8.8.0", "pg": "^8.8.0",
...@@ -4645,30 +4644,6 @@ ...@@ -4645,30 +4644,6 @@
"integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/axios": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz",
"integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
}
},
"node_modules/axios/node_modules/form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/babel-loader": { "node_modules/babel-loader": {
"version": "8.2.5", "version": "8.2.5",
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz",
...@@ -13421,11 +13396,6 @@ ...@@ -13421,11 +13396,6 @@
"node": ">= 0.10" "node": ">= 0.10"
} }
}, },
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"node_modules/psl": { "node_modules/psl": {
"version": "1.9.0", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
...@@ -20591,28 +20561,6 @@ ...@@ -20591,28 +20561,6 @@
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz",
"integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA=="
}, },
"axios": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz",
"integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==",
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
"proxy-from-env": "^1.1.0"
},
"dependencies": {
"form-data": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz",
"integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==",
"requires": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"mime-types": "^2.1.12"
}
}
}
},
"babel-loader": { "babel-loader": {
"version": "8.2.5", "version": "8.2.5",
"resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz",
...@@ -26697,11 +26645,6 @@ ...@@ -26697,11 +26645,6 @@
} }
} }
}, },
"proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
},
"psl": { "psl": {
"version": "1.9.0", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz",
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
"@strapi/provider-email-nodemailer": "^4.3.8", "@strapi/provider-email-nodemailer": "^4.3.8",
"@strapi/provider-upload-aws-s3": "^4.3.9", "@strapi/provider-upload-aws-s3": "^4.3.9",
"@strapi/strapi": "4.3.6", "@strapi/strapi": "4.3.6",
"axios": "^1.1.3",
"better-sqlite3": "7.4.6", "better-sqlite3": "7.4.6",
"mysql": "^2.18.1", "mysql": "^2.18.1",
"pg": "^8.8.0", "pg": "^8.8.0",
......
...@@ -16,24 +16,26 @@ ...@@ -16,24 +16,26 @@
"type": "string" "type": "string"
}, },
"bannerImageDesktop": { "bannerImageDesktop": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images",
"files", "files",
"videos", "videos",
"audios" "audios"
], ]
"type": "media",
"multiple": false
}, },
"bannerImageMobile": { "bannerImageMobile": {
"type": "media",
"multiple": false,
"required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images",
"files", "files",
"videos", "videos",
"audios" "audios"
], ]
"type": "media",
"multiple": false
}, },
"featuresTitle": { "featuresTitle": {
"type": "string" "type": "string"
...@@ -51,27 +53,32 @@ ...@@ -51,27 +53,32 @@
"type": "text" "type": "text"
}, },
"exteriorDesignImages": { "exteriorDesignImages": {
"type": "media",
"multiple": true,
"required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images",
"files", "files",
"videos", "videos",
"audios" "audios"
], ]
"type": "media",
"multiple": true
}, },
"interiorDesignText1": { "interiorDesignText1": {
"type": "text" "type": "text"
}, },
"interiorDesignImages": { "interiorDesignImages": {
"type": "media",
"multiple": true,
"required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images",
"files", "files",
"videos", "videos",
"audios" "audios"
], ]
"type": "media", },
"multiple": true "slug": {
"type": "uid"
} }
} }
} }
"use strict"; "use strict";
const axios = require("axios");
const { factories } = require("@strapi/strapi"); const { factories } = require("@strapi/strapi");
/** /**
...@@ -13,29 +12,7 @@ module.exports = factories.createCoreService( ...@@ -13,29 +12,7 @@ module.exports = factories.createCoreService(
"api::game.game", "api::game.game",
({ strapi: Strapi }) => ({ ({ strapi: Strapi }) => ({
async importSeedDataFromApi() { async importSeedDataFromApi() {
const seedData = await axios.get(
"https://public.connectnow.org.uk/applicant-test/"
);
// console.log("seedData", seedData.data[0]);
let seedDataFinal = seedData.data;
const date = new Date()
const deletedCnt = await strapi.db.query("api::game.game").deleteMany({ where: {} });
for (let i = 0; i < seedDataFinal.length; i++) {
const item = seedDataFinal[i];
// console.log("seedData", item);
// console.log(`Attempting to create country: `, country);
await strapi.entityService.create("api::game.game", {
data: {
firstReleaseDate: `${item.first_release_date}`,
name: item.name,
rating: `${item.rating}`,
summary: item.summary,
publishedAt: date
},
});
}
}, },
}) })
); );
...@@ -7,7 +7,6 @@ const { ...@@ -7,7 +7,6 @@ const {
validateRegisterBody, validateRegisterBody,
} = require("@strapi/plugin-users-permissions/server/controllers/validation/auth"); } = require("@strapi/plugin-users-permissions/server/controllers/validation/auth");
const { getService } = require("@strapi/plugin-users-permissions/server/utils"); const { getService } = require("@strapi/plugin-users-permissions/server/utils");
const { default: axios } = require("axios");
const sanitizeUser = (user, ctx) => { const sanitizeUser = (user, ctx) => {
const { auth } = ctx.state; const { auth } = ctx.state;
......
...@@ -2667,15 +2667,6 @@ ...@@ -2667,15 +2667,6 @@
"resolved" "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz" "resolved" "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz"
"version" "1.11.0" "version" "1.11.0"
"axios@^1.1.3":
"integrity" "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA=="
"resolved" "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz"
"version" "1.1.3"
dependencies:
"follow-redirects" "^1.15.0"
"form-data" "^4.0.0"
"proxy-from-env" "^1.1.0"
"axios@0.27.2": "axios@0.27.2":
"integrity" "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==" "integrity" "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ=="
"resolved" "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz" "resolved" "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz"
...@@ -4818,7 +4809,7 @@ ...@@ -4818,7 +4809,7 @@
"resolved" "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz" "resolved" "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz"
"version" "1.1.0" "version" "1.1.0"
"follow-redirects@^1.0.0", "follow-redirects@^1.14.9", "follow-redirects@^1.15.0": "follow-redirects@^1.0.0", "follow-redirects@^1.14.9":
"integrity" "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" "integrity" "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA=="
"resolved" "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz" "resolved" "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz"
"version" "1.15.1" "version" "1.15.1"
...@@ -8009,11 +8000,6 @@ ...@@ -8009,11 +8000,6 @@
"forwarded" "0.2.0" "forwarded" "0.2.0"
"ipaddr.js" "1.9.1" "ipaddr.js" "1.9.1"
"proxy-from-env@^1.1.0":
"integrity" "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="
"resolved" "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz"
"version" "1.1.0"
"psl@^1.1.28": "psl@^1.1.28":
"integrity" "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" "integrity" "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag=="
"resolved" "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz" "resolved" "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz"
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!