v1.2.0: planes.owner_id + ownership checks + per-player onboarding (ISS-108, ISS-109)
CI / build + unit + e2e (pull_request) Successful in 13m46s
CI / build + unit + e2e (pull_request) Successful in 13m46s
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user