Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
poffdeluxe committed Dec 10, 2019
1 parent 1f279de commit 80b4b6a
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { CustomElementSchema } from './custom_element_schema';
import { CustomElementAttributes } from './custom_element_attributes';
import { okResponse } from '../ok_response';
import { catchErrorHandler } from '../catch_error_handler';
import { CustomElement } from '../../../../../legacy/plugins/canvas/types';

export function initializeCreateCustomElementRoute(deps: RouteInitializerDeps) {
const { router } = deps;
Expand All @@ -32,11 +31,7 @@ export function initializeCreateCustomElementRoute(deps: RouteInitializerDeps) {
},
},
catchErrorHandler(async (context, request, response) => {
if (!request.body) {
return response.badRequest({ body: 'A custom element payload is required' });
}

const customElement = request.body as CustomElement;
const customElement = request.body;

const now = new Date().toISOString();
const { id, ...payload } = customElement;
Expand Down

0 comments on commit 80b4b6a

Please sign in to comment.