diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-21 18:55:39 +0100 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-21 18:55:39 +0100 |
commit | eaa99478a7612405bc93941ea69b93e7e776ca56 (patch) | |
tree | d556a87cce9426481f08ef55abbd08d5d40fb8ca | |
parent | 8f01190eb5ec0f40d6f8874a3f3c79637000a709 (diff) | |
download | gitlab-ce-eaa99478a7612405bc93941ea69b93e7e776ca56.tar.gz |
Up API version to v3
-rw-r--r-- | app/views/layouts/_init_auto_complete.html.haml | 2 | ||||
-rw-r--r-- | doc/api/README.md | 2 | ||||
-rw-r--r-- | lib/api.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml index 800dfbe8859..8f8c7d8885e 100644 --- a/app/views/layouts/_init_auto_complete.html.haml +++ b/app/views/layouts/_init_auto_complete.html.haml @@ -1,6 +1,6 @@ :javascript $(function() { - GitLab.GfmAutoComplete.Members.url = "#{ "/api/v2/projects/#{@project.id}/members" if @project }"; + GitLab.GfmAutoComplete.Members.url = "#{ "/api/v3/projects/#{@project.id}/members" if @project }"; GitLab.GfmAutoComplete.Members.params.private_token = "#{current_user.private_token}"; GitLab.GfmAutoComplete.Emoji.data = #{raw emoji_autocomplete_source}; diff --git a/doc/api/README.md b/doc/api/README.md index ca346418f23..477429c9fa0 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -15,7 +15,7 @@ API requests should be prefixed with `api` and the API version. The API version Example of a valid API request: ``` -GET http://example.com/api/v2/projects?private_token=QVy1PB7sTxfy4pqfZM1U +GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U ``` The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL. diff --git a/lib/api.rb b/lib/api.rb index d01d534cf6b..f58b82ff98e 100644 --- a/lib/api.rb +++ b/lib/api.rb @@ -2,7 +2,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file} module Gitlab class API < Grape::API - version 'v2', using: :path + version 'v3', using: :path rescue_from ActiveRecord::RecordNotFound do rack_response({'message' => '404 Not found'}.to_json, 404) |