const express = require("express")
const router = express.Router()
const {registerUser, loginUser} = require("../controllers/users.c")
const { Auth } = require("../middleware/authentication")
const { createStudent, updateStudent, getStudent, deleteStudent } = require("../controllers/students.c")
const { createPayment, updatePayment, deletePayment, getPayment } = require("../controllers/payment.c")

router.post("/register", registerUser)
router.post("/login", loginUser)

router.get("/students",Auth, getStudent)
router.post("/students",Auth, createStudent)
router.put("/students/:id",Auth, updateStudent)
router.delete("/students/:id",Auth, deleteStudent)

router.get("/payment",Auth, getPayment)
router.post("/payment",Auth, createPayment)
router.put("/payment/:id",Auth, updatePayment)
router.delete("/payment/:id",Auth, deletePayment)

module.exports = router