diff --git a/package.json b/package.json index 1a04382..8ff30db 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "strapi-plugin-documentation": "3.5.4", "strapi-plugin-email": "3.5.4", "strapi-plugin-graphql": "3.5.4", - "strapi-plugin-mobile": "0.0.1", "strapi-plugin-upload": "3.5.4", "strapi-plugin-users-permissions": "3.5.4", "strapi-provider-email-nodemailer": "3.6.0", diff --git a/plugins/mobile/config/routes.json b/plugins/mobile/config/routes.json index 644c590..fbdde78 100644 --- a/plugins/mobile/config/routes.json +++ b/plugins/mobile/config/routes.json @@ -1,13 +1,5 @@ { "routes": [ - { - "method": "GET", - "path": "/", - "handler": "mobile.index", - "config": { - "policies": [] - } - }, { "method": "GET", "path": "/metadata", diff --git a/plugins/mobile/controllers/mobile.js b/plugins/mobile/controllers/mobile.js index c89a028..9468163 100644 --- a/plugins/mobile/controllers/mobile.js +++ b/plugins/mobile/controllers/mobile.js @@ -14,46 +14,38 @@ module.exports = { */ tables: async (ctx) => { const rawBuilder = strapi.connections.default.raw( - "select * from core_store" + "select * from core_store;" ); const response = await rawBuilder.then(); const finalInformation = {} - response.map((e) => - { - if(_.startsWith(e.key,"model_def_application::")){ - const value=JSON.parse(e.value) - finalInformation[value.uid]={ - ...finalInformation[value.uid], - collectionName: value.collectionName, - kind: value.kind, - name: value.info.name, - description: value.info.description, - } - } - if(_.startsWith(e.key, - "plugin_content_manager_configuration_content_types::application::" - )){ - const value=JSON.parse(e.value) - finalInformation[value.uid]={ - ...finalInformation[value.uid], - defaultSortBy: value.settings.defaultSortBy, - mainField: value.settings.mainField, - defaultSortOrder: value.settings.defaultSortOrder, - layout: value.layouts.list - } - } - } - ); - ctx.send({ - message: finalInformation - }); - }, - index: async (ctx) => { - // Add your own logic here. - console.error("Heya!"); - // Send 200 `ok` + // response.map((e) => + // { + // if(_.startsWith(e.key,"model_def_application::")){ + // const value=JSON.parse(e.value) + // finalInformation[value.uid]={ + // ...finalInformation[value.uid], + // collectionName: value.collectionName, + // kind: value.kind, + // name: value.info.name, + // description: value.info.description, + // } + // } + // if(_.startsWith(e.key, + // "plugin_content_manager_configuration_content_types::application::" + // )){ + // const value=JSON.parse(e.value) + // finalInformation[value.uid]={ + // ...finalInformation[value.uid], + // defaultSortBy: value.settings.defaultSortBy, + // mainField: value.settings.mainField, + // defaultSortOrder: value.settings.defaultSortOrder, + // layout: value.layouts.list + // } + // } + // } + // ); ctx.send({ - message: "mok", + message: response }); }, }; diff --git a/plugins/mobile/package.json b/plugins/mobile/package.json index 5398420..4e868c3 100644 --- a/plugins/mobile/package.json +++ b/plugins/mobile/package.json @@ -3,23 +3,31 @@ "version": "0.0.0", "description": "This is the description of the plugin.", "strapi": { - "name": "mobile", + "name": "Mobile Application", "icon": "plug", "description": "Description of mobile plugin." }, "dependencies": {}, + "bugs": { + "url": "https://github.com/nirmalhk7/strapi-plugins-mobile/issues", + "email": "nirmalhk7@gmail.com" + }, "author": { - "name": "A Strapi developer", - "email": "", - "url": "" + "name": "Nirmal Khedkar", + "email": "nirmalhk7@gmail.com", + "url": "https://nirmalhk7.tech" }, "maintainers": [ { - "name": "A Strapi developer", - "email": "", - "url": "" + "name": "Nirmal Khedkar", + "email": "nirmalhk7@gmail.com", + "url": "https://nirmalhk7.tech" } ], + "repository": { + "type": "git", + "url": "https://github.com/nirmalhk7/strapi-plugins-mobile.git" + }, "engines": { "node": ">=10.16.0 <=14.x.x", "npm": ">=6.0.0"