Skip to content

Instantly share code, notes, and snippets.

@simonjcarr
Created August 23, 2020 10:16
Show Gist options
  • Select an option

  • Save simonjcarr/db5e4551d2ecd5495fb9502a027b933a to your computer and use it in GitHub Desktop.

Select an option

Save simonjcarr/db5e4551d2ecd5495fb9502a027b933a to your computer and use it in GitHub Desktop.
'use strict'
//The line below provides intelisense. to make use of intelisense run the following command in your terminal
// npm install -g typescript
/** @type {typeof import('@adonisjs/framework/src/Route/Manager')} */
const Route = use('Route')
Route.group(() => {
Route.post("/register", "UserController.register")
Route.post("/login", "UserController.login")
Route.get("/:id", "UserController.getUserProfile")
Route.patch("/:id", "UserController.updateUserProfile")
}).prefix("/api/v1/user")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment