Skip to content

Futsalio/futsalio_backend

Repository files navigation

futsalio_backend

futsalio for backend system

  1. Schema`s

  • User
    • id
    • email
    • username
    • password
    • phone_number
    • full_name
    • point
    • id_role
  • role
    • id
    • name
  1. Role List`s

    • SA
      • Super Admin
    • AF
      • Admin Futsalio
    • OT
      • Owner Tempat Futsal
    • AT
      • Admin Tempat Futsal
    • Pengguna
      • Users Biasa ( pemain futsal yang ingin book lapangan )
  2. Endpoint`s


  • user /users/

    • routes
      • post : /users/signup | user signup input data
      • post : /users/signin | user signin by type email and password
      • get : /users/:id_role | get all users by id_role
      • delete : /users/:id | delete user by specific id
      • put : /users/:id | edit user by id
  • role /roles/

    • routes
      • post : /roles/ | add new role for users auth
      • get : /roles/ | get all role
      • get : /roles/:id_role | get role by id role need auth
      • put : /roles/:id | edit role by id need auth
      • delete : /roles/:id | delete by id role
  1. Example User Login Response

by inputing email and password on logging form you got respon authorization Bearer

    email: youremail@email.com
    password: yourpassword
    {
    "authorization":         "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiZnVsbF9uYW1lIjoiYWRtaW4iLCJpYXQiOjE1MTE3MDU4NjF9.jNgH6ZvrD2wDmd6bdpZ0vxRgcNgxNsU3UdLg2FRD4LA"
    }

if you want to authenticate this token place it in headers on your http request / AJAX.

  1. API
ec2-52-221-217-60.ap-southeast-1.compute.amazonaws.com
  1. API verify token di gunakan setelah login untuk cek id_role page front end akan mengikuti sesuai role yang keluar dari decoded ini
method post: /api/secret/verify

masukan -> authorization = 'Bearer {your_access_token}'

output JSON:

{
    "userinfo": {
        "id": 3,
        "full_name": "erwin",
        "id_role": 3,
        "iat": 1513240718
    }
}

About

futsalio for backend system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages