import express from 'express';
const router = express.Router();

/**
 * @swagger
 * /tools/hanyacontoh:
 *   get:
 *     tags: [Tools]
 *     summary: Pencarian Alat (Simulasi)
 *     parameters:
 *       - in: query
 *         name: q
 *         required: true
 *         schema:
 *           type: string
 *     responses:
 *       200:
 *         description: Berhasil
 */
router.get('/', (req, res) => {
  const { q } = req.query;
  if (!q) return res.status(400).json({ status: false, error: "Parameter q wajib diisi" });
  res.json({ status: true, query: q, result: `INI HANYA CINTOH KAMU BISA KEMBANGIN SENDIRI LAGI` });
});

export default router;