# Routes Config
#
# This file defines all application routes (Higher priority routes first)
#

module:testrunner
# module:jobs



# Ignore favicon requests
GET     /favicon.ico                            404

# Map static resources from the /app/public folder to the /public path
GET     /public/*filepath                       Static.Serve("public")

GET     /           App.Index

GET /adm            Login.Show
PATCH /adm/changepass  Login.NewPassword

GET     /mahasiswa/show         Mahasiswa.Show
GET     /mahasiswa            Mahasiswa.Index
GET     /mahasiswa/:email            Mahasiswa.Index
GET     /mahasiswa/id/:email            Mahasiswa.GetID
GET     /mahasiswa/isadmin/:email     Mahasiswa.GetAdmin
GET     /mahasiswa/getpowerups/:email     Mahasiswa.GetPowerups
GET     /mahasiswa/getcoin/:email     Mahasiswa.GetCoin
POST     /mahasiswa/create   Mahasiswa.Create
PATCH   /mahasiswa/powerups/:email    Mahasiswa.ChangePowerups
PATCH   /mahasiswa/coin/:email    Mahasiswa.ChangeCoin
PATCH   /mahasiswa/admin/:id    Mahasiswa.SetAsAdmin
DELETE  /mahasiswa/delete/:id    Mahasiswa.Delete

GET     /jenissoal           JenisSoal.Index

GET     /matkul            MataKuliah.Index
GET     /matkul/:kode            MataKuliah.IndexById
POST     /matkul/create   MataKuliah.Create
PATCH     /matkul/update/:kode MataKuliah.Update
DELETE  /matkul/delete/:kode    MataKuliah.Delete

GET     /pilihanjawaban/:ID_soal            PilihanJawaban.Index

GET     /leaderboard            Leaderboard.Index
GET     /leaderboard/:ID_materi            Leaderboard.Index
GET     /leaderboard/score/:ID_player/:ID_materi               Leaderboard.GetHighScore
POST     /leaderboard/create   Leaderboard.Create
PATCH   /leaderboard/update     Leaderboard.Update

GET     /room            Room.Index
GET     /room/:ID_room           Room.Index
GET     /room/materi/:ID_materi        Room.IndexByMateri
POST     /room/create   Room.Create
PATCH     /room/player/:id   Room.InsertPlayer
PATCH     /room/keyplayer/:id   Room.ChangeKeyPlayer
DELETE   /room/delete/:kode            Room.DeleteByCode

GET     /materi/:kodeMK            Materi.Index
GET     /materi           Materi.Index
GET     /materi/id/:id_materi           Materi.IndexById
POST     /materi/create   Materi.Create
PATCH     /materi/update/:id Materi.Update
DELETE  /materi/delete/:id  Materi.Delete

GET     /soal/get/:id           Soal.GetSoalById
GET     /soal                   Soal.Index
GET     /soal/all/:ID_materi/:limit     Soal.GetAll
GET     /soal/:limit               Soal.Index
GET     /soal/count/:ID_materi  Soal.Count
GET     /soal/:ID_materi/:limit          Soal.Index
POST     /soal/create   Soal.Create
PATCH     /soal/update/:id Soal.Update
DELETE      /soal/delete/:id Soal.Delete




# Catch all, this will route any request into the controller path
#
#                    **** WARNING ****
# Enabling this exposes any controller and function to the web.
# ** This is a serious security issue if used online **
#
# For rapid development uncomment the following to add new controller.action endpoints
# without having to add them to the routes table.
# *       /:controller/:action                    :controller.:action
