File tree Expand file tree Collapse file tree 5 files changed +11
-6
lines changed Expand file tree Collapse file tree 5 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " strapi-plugin-webtools " : major
3+ ---
4+
5+ refactor: rename the router controller to 'findOne' for fetching with a read-only API token
Original file line number Diff line number Diff line change 11import urlAliasController from './url-alias' ;
22import urlPatternController from './url-pattern' ;
33import infoController from './info' ;
4- import coreController from './core ' ;
4+ import routerController from './router ' ;
55import searchController from './search' ;
66
77export default {
88 'url-alias' : urlAliasController ,
99 'url-pattern' : urlPatternController ,
1010 info : infoController ,
11- core : coreController ,
11+ router : routerController ,
1212 search : searchController ,
1313} ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { sanitizeOutput } from '../util/sanitizeOutput';
1010 */
1111
1212export default {
13- router : async ( ctx : Context ) => {
13+ findOne : async ( ctx : Context ) => {
1414 const { path, ...searchQuery } = ctx . query ;
1515 const { auth } = ctx . state ;
1616
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ export default {
4545 {
4646 method : 'GET' ,
4747 path : '/router' ,
48- handler : 'core. router' ,
48+ handler : 'router.findOne ' ,
4949 config : {
5050 policies : [ ] ,
5151 } ,
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ export default {
3636
3737 publicRole . permissions [ 'plugin::webtools' ] = {
3838 controllers : {
39- core : {
40- router : { enabled : true } ,
39+ router : {
40+ findOne : { enabled : true } ,
4141 } ,
4242 'url-alias' : {
4343 find : { enabled : true } ,
You can’t perform that action at this time.
0 commit comments