mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
parent
851af7ba09
commit
40285a0855
2 changed files with 5 additions and 6 deletions
|
@ -32,11 +32,10 @@ export class WatchesService {
|
|||
// $http.delete does not take the request body as the 2nd argument. Instead it expects the 2nd
|
||||
// argument to be a request options object, one of which can be the request body (data). We also
|
||||
// need to explicitly define the content type of the data.
|
||||
const requestOpts = {
|
||||
data: { watchIds },
|
||||
headers: { 'Content-Type': 'application/json' }
|
||||
const body = {
|
||||
watchIds
|
||||
};
|
||||
return this.$http.delete(`${this.basePath}/watches`, requestOpts)
|
||||
return this.$http.post(`${this.basePath}/watches/delete`, body)
|
||||
.then(response => response.data.results);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ export function registerDeleteRoute(server) {
|
|||
const licensePreRouting = licensePreRoutingFactory(server);
|
||||
|
||||
server.route({
|
||||
path: '/api/watcher/watches',
|
||||
method: 'DELETE',
|
||||
path: '/api/watcher/watches/delete',
|
||||
method: 'POST',
|
||||
handler: async (request) => {
|
||||
const callWithRequest = callWithRequestFactory(server, request);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue