import express from "express";
const Debug = express.Router();

import config from "../../config.js";

Debug.post("/actions/debug", (req, res, next) => {
  res.status(501)
  .send("GET Only");
});

Debug.get("/actions/debug", (req, res) => {
  let debug;

  if (config.debug === undefined) {
    debug = false;
  } else {
    debug = true;
  }

  res.status(200)
  .send(debug);
});

export default Debug;
