Add deployment blueprints and reviewed launch recipes
This commit is contained in:
@@ -57,8 +57,9 @@ export async function POST({ request }: { request: Request }) {
|
||||
mapSlug?: string;
|
||||
plutoKey?: string;
|
||||
expectedName?: string;
|
||||
previewId?: string;
|
||||
};
|
||||
if (!body || (body.game !== undefined && body.game !== 't5' && body.game !== 't6') || typeof body.gameMode !== 'string' || typeof body.mapSlug !== 'string' || (body.plutoKey !== undefined && typeof body.plutoKey !== 'string') || (body.expectedName !== undefined && typeof body.expectedName !== 'string')) {
|
||||
if (!body || (body.game !== undefined && body.game !== 't5' && body.game !== 't6') || typeof body.gameMode !== 'string' || typeof body.mapSlug !== 'string' || (body.plutoKey !== undefined && typeof body.plutoKey !== 'string') || (body.expectedName !== undefined && typeof body.expectedName !== 'string') || (body.previewId !== undefined && (typeof body.previewId !== 'string' || !body.previewId))) {
|
||||
return json(
|
||||
{ ok: false, error: 'game must be t5 or t6; gameMode and mapSlug are required strings; plutoKey and expectedName are optional strings', kind: 'bad-request' },
|
||||
{ status: 400 }
|
||||
@@ -70,6 +71,7 @@ export async function POST({ request }: { request: Request }) {
|
||||
mapSlug: body.mapSlug,
|
||||
plutoKey: body.plutoKey,
|
||||
expectedName: body.expectedName,
|
||||
previewId: body.previewId,
|
||||
createdBy: 'ui'
|
||||
});
|
||||
if (!result.ok) {
|
||||
|
||||
Reference in New Issue
Block a user