- React + Vite + Tailwind 프론트엔드 - Express + Sequelize + MariaDB 백엔드 - 넥슨 OAuth 2.0 인증 (캐릭터 목록 조회) - 주간 보스 결정석 수익 계산기 UI (리스트형) - Docker Compose + Caddy 리버스 프록시 설정 - 보스/난이도 이미지 에셋 포함 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
23 lines
672 B
JavaScript
23 lines
672 B
JavaScript
import { Router } from 'express';
|
|
import { Boss, BossDifficulty } from '../../models/index.js';
|
|
|
|
const router = Router();
|
|
|
|
// 보스 목록 + 난이도별 결정석 가격
|
|
router.get('/', async (_req, res) => {
|
|
try {
|
|
const bosses = await Boss.findAll({
|
|
include: [{ model: BossDifficulty, as: 'difficulties' }],
|
|
order: [
|
|
['sort_order', 'ASC'],
|
|
[{ model: BossDifficulty, as: 'difficulties' }, 'crystal_price', 'DESC'],
|
|
],
|
|
});
|
|
res.json(bosses);
|
|
} catch (err) {
|
|
console.error('보스 목록 조회 오류:', err.message);
|
|
res.status(500).json({ error: '보스 목록 조회 실패' });
|
|
}
|
|
});
|
|
|
|
export default router;
|