const Router = require("@koa/router")
const migrationsController = require("../controllers/migrations")
const router = Router()
const { internalApi } = require("@devlego/backend-core/auth")

router
  .post("/api/migrations/run", internalApi, migrationsController.migrate)
  .get(
    "/api/migrations/definitions",
    internalApi,
    migrationsController.fetchDefinitions
  )

module.exports = router
