Skip to content
This repository has been archived by the owner on May 1, 2021. It is now read-only.

Init fork v1 // Make the REST Api a little bit more Processwire'esque #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Luis85
Copy link

@Luis85 Luis85 commented Dec 6, 2018

Extended Install routine

  • added api template
  • added api fields
  • add api route container
  • added example route pages

Changes to routes.php

  • added method to grab pw created pages as routes

  • let the module scan for new api classes

  • changed file structure

Extended Install routine
- added api template
- added api fields
- add api route  container
- added example route pages

Changes to routes.php
- added method to grab pw created pages as routes
- let the module scan for new api classes

- changed file structure
removed auth condition check since pw gives true or false via checkbox anyways
This reverts commit 37cc3c2.
@thomasaull
Copy link
Owner

@Luis85 Thanks for your input and your work on the module – it's really appreciated! However, I'm personally not sure if it is the most sensible approach to define the endpoints in ProcessWire itself:

  • It's slower compared to just copy&paste a line in Routes.php
  • the routes are not going to be version controlled in git (which is my main pain point here)
  • it's going to be a developer anyway, who implements the endpoint's logic. So I guess this person is probably comfortable to add the corresponding route aswell

I can't see any real upsides to this approach from my point of view. If I'm missing something here, I'd be happy if you could elaborate :)

thomasaull pushed a commit that referenced this pull request Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants