import express from "express";
import {
  login,
  appLaunch,
  appReturn,
  googleToken,
  googleAuth,
  googleCallback,
  googleCallbackJSON,
} from "../controllers/authController.js";
import { requireAuth } from "../middlewares/authMiddleware.js";

const router = express.Router();

router.post("/login", login);
router.post("/app-launch", requireAuth, appLaunch);
router.post("/app-return", appReturn);
router.post("/google/token", googleToken);
router.get("/google", googleAuth);
router.get("/google/callback", googleCallback);
router.get("/google/callback/json", googleCallbackJSON);

export default router;
