v1.2.0: planes.owner_id + ownership checks + per-player onboarding (ISS-108, ISS-109)
CI / build + unit + e2e (pull_request) Successful in 13m46s

This commit is contained in:
2026-09-26 16:27:00 +00:00
parent ba2c36a3f8
commit ec26f9f366
25 changed files with 436 additions and 148 deletions
+1 -1
View File
@@ -27,5 +27,5 @@ export async function POST(req: Request) {
}
const model = input.model;
return performAction(req, (inst) => buyPlane(inst, model));
return performAction(req, (inst, playerId) => buyPlane(inst, model, playerId));
}
+1 -1
View File
@@ -60,7 +60,7 @@ describe('POST /api/market/sell-plane', () => {
const { db } = await getGameDb();
// A second, grounded plane so "flying" is the reason for rejection.
await db.insert(schema.planes).values({
id: 'plane-extra', model: 'atr72', status: 'available', fuel: 100, maxFuel: PLANE_TYPES.atr72.maxFuel,
id: 'plane-extra', ownerId: 'local', model: 'atr72', status: 'available', fuel: 100, maxFuel: PLANE_TYPES.atr72.maxFuel,
locationIcao: 'EDDF', destIcao: null, lat: 50.03, lon: 8.57, departureSimTime: null,
});
await db.update(schema.planes).set({ status: 'flying' }).where(eq(schema.planes.id, 'plane-extra'));
+1 -1
View File
@@ -27,5 +27,5 @@ export async function POST(req: Request) {
}
const planeId = input.planeId;
return performAction(req, (inst) => sellPlane(inst, planeId));
return performAction(req, (inst, playerId) => sellPlane(inst, planeId, playerId));
}