Created
January 16, 2022 18:58
-
-
Save Marlysson/18a0285774ed50e61a5010fdbdf6d0bd to your computer and use it in GitHub Desktop.
Details api masonite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# api.py | |
from masonite.routes import Route | |
ROUTES = [ | |
Route.get('/podcasts', 'api.PodcastController@index') | |
] | |
# web.py | |
from masonite.routes import Route | |
from masonite.api import Api | |
ROUTES = [ | |
Route.api('podcasts', "api.PodcastController"), | |
] | |
ROUTES += Api.routes(auth_route="/api/auth", reauth_route="/api/reauth") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment