diff --git a/src/plugins/dashboard/server/api/register_routes.ts b/src/plugins/dashboard/server/api/register_routes.ts index 692942e1bd1bb..79d418fcde21d 100644 --- a/src/plugins/dashboard/server/api/register_routes.ts +++ b/src/plugins/dashboard/server/api/register_routes.ts @@ -163,8 +163,7 @@ export function registerAPIRoutes({ } return res.badRequest(e.message); } - - return res.created({ body: result }); + return res.ok({ body: result }); } ); diff --git a/test/api_integration/apis/dashboards/update_dashboard/main.ts b/test/api_integration/apis/dashboards/update_dashboard/main.ts index 18a7d5ca2d3fe..fa6b7758920c2 100644 --- a/test/api_integration/apis/dashboards/update_dashboard/main.ts +++ b/test/api_integration/apis/dashboards/update_dashboard/main.ts @@ -14,7 +14,7 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const supertest = getService('supertest'); describe('main', () => { - it('should return 201 with an updated dashboard', async () => { + it('should return 200 with an updated dashboard', async () => { const response = await supertest .put(`${PUBLIC_API_PATH}/be3733a0-9efe-11e7-acb3-3dab96693fab`) .set('kbn-xsrf', 'true') @@ -45,7 +45,7 @@ export default function ({ getService }: FtrProviderContext) { ], }); - expect(response.status).to.be(201); + expect(response.status).to.be(200); expect(response.body.item.id).to.be('be3733a0-9efe-11e7-acb3-3dab96693fab'); expect(response.body.item.type).to.be('dashboard');