Switch login to password-only and split pack zip paths

- Login form/route accepts password only; matched account row provides session userId
- PackDefinition: replace packPath with mapPath (.mc_custom/saves) and serverPath (server install dir); editor exposes two .zip fields
- Installer resolves relative platform/map/server URLs against manifest origin under /file/{platforms,maps,servers}/<name>; downloads and extracts the zips

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-10 20:06:32 +09:00
parent 7a963d0409
commit 9c4f0e8dbc
7 changed files with 82 additions and 41 deletions

View File

@@ -38,12 +38,11 @@ opRouter.get('/op', (req, res) => {
opRouter.post('/op', async (req, res, next) => {
try {
const id = pickFirstValue(req.body.id).trim()
const password = pickFirstValue(req.body.password)
const accounts = await readAccounts()
const matched = accounts.find((entry) => entry.id === id && entry.password === password)
const matched = accounts.find((entry) => entry.password === password)
if (!matched) {
res.status(401).render('op/login', { error: '아이디 또는 비밀번호가 올바르지 않습니다.' })
res.status(401).render('op/login', { error: '비밀번호가 올바르지 않습니다.' })
return
}
req.session.userId = matched.id
@@ -147,7 +146,8 @@ opRouter.post('/op/dashboard/:packName', requireAuth, async (req, res, next) =>
serverMaxRam: Number(pickFirstValue(req.body.serverMaxRam)),
clientMinRam: Number(pickFirstValue(req.body.clientMinRam)),
clientRecommendedRam: Number(pickFirstValue(req.body.clientRecommendedRam)),
packPath: pickFirstValue(req.body.packPath)
mapPath: pickFirstValue(req.body.mapPath),
serverPath: pickFirstValue(req.body.serverPath)
}
const normalized = normalizePackDefinition(partial)