Skip to content

Commit

Permalink
Merge pull request #37 from NewcastleRSE/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
markdturner authored Sep 27, 2024
2 parents 64c38e4 + 2aabd5a commit 4faf779
Show file tree
Hide file tree
Showing 10 changed files with 1,364 additions and 1,369 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"@strapi/plugin-sentry": "^4.24.2",
"@strapi/plugin-users-permissions": "^4.24.2",
"@strapi/strapi": "^4.24.2",
"axios": "1.4.0",
"axios": "^1.7.5",
"axios-cache-interceptor": "^1.5.3",
"camelcase": "5.2.0",
"camelcase-keys": "5.2.0",
"deepdash": "^5.3.9",
Expand All @@ -39,7 +40,7 @@
"uuid": "ca6b733a-92c2-453b-9dbb-89dbf373fb2d"
},
"engines": {
"node": ">=16.x.x <=18.x.x",
"node": ">=16.x.x <=20.x.x",
"npm": ">=6.0.0"
},
"license": "MIT"
Expand Down
31 changes: 29 additions & 2 deletions src/api/rse/controllers/rse.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@
* rse controller
*/

const { createCoreController } = require('@strapi/strapi').factories;
const { createCoreController } = require('@strapi/strapi').factories

module.exports = createCoreController('api::rse.rse');
module.exports = createCoreController('api::rse.rse')

// module.exports = createCoreController('api::rse.rse', ({ strapi }) => ({
// find: async (ctx) => {
// try {
// return await strapi.service('api::rse.rse').find(ctx.request.query)
// } catch (err) {
// console.error(err)
// return err
// }
// },
// // Override findOne to use a filter on the find method for service code reuse
// findOne: async (ctx) => {
// try {
// ctx.request.query.filters = { id: ctx.params.id }
// const response = await strapi.service('api::rse.rse').find(ctx.request.query)
// if (response.results.length === 1) {
// return {
// data: response.results[0],
// meta: {}
// }
// }
// } catch (err) {
// console.error(err)
// return err
// }
// }
// }))
Loading

0 comments on commit 4faf779

Please sign in to comment.