From fbe04019805e2a900165a3bb08c6e29a5b3e6dd5 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Thu, 22 Dec 2016 09:45:15 +0100 Subject: [PATCH] drop api/events WS --- server/sonar-web/src/main/js/api/events.js | 35 ------------------- .../src/main/webapp/WEB-INF/config/routes.rb | 1 - 2 files changed, 36 deletions(-) delete mode 100644 server/sonar-web/src/main/js/api/events.js diff --git a/server/sonar-web/src/main/js/api/events.js b/server/sonar-web/src/main/js/api/events.js deleted file mode 100644 index 7d9d2da53e0..00000000000 --- a/server/sonar-web/src/main/js/api/events.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * SonarQube - * Copyright (C) 2009-2016 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -import { getJSON } from '../helpers/request.js'; - -/** - * Return events for a component - * @param {string} componentKey - * @param {string} [categories] - * @returns {Promise} - */ -export function getEvents (componentKey, categories) { - const url = '/api/events'; - const data = { resource: componentKey }; - if (categories) { - data.categories = categories; - } - return getJSON(url, data); -} diff --git a/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb b/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb index e51f89c25d8..fdb9431c329 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/config/routes.rb @@ -1,6 +1,5 @@ ActionController::Routing::Routes.draw do |map| map.namespace :api do |api| - api.resources :events, :only => [:index, :show, :create, :destroy] api.resources :user_properties, :only => [:index, :show, :create, :destroy], :requirements => { :id => /.*/ } api.resources :projects, :only => [:index], :requirements => { :id => /.*/ } api.resources :favourites, :only => [:index, :show, :create, :destroy], :requirements => { :id => /.*/ } -- 2.39.5