Advertisement
Guest User

Untitled

a guest
May 26th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. export class UsersController {
  2.  
  3. @authorize.public() // accessible to public
  4. @route.post("")
  5. async save(data: User) {
  6. // implementation
  7. }
  8.  
  9. @authorize.role("Admin") // accessible only to Admin
  10. @route.get("")
  11. list(offset: number, limit: number) {
  12. // implementation
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement