2016-02-09 07:10:16 -05:00
|
|
|
class Projects::BadgesController < Projects::ApplicationController
|
2016-03-22 05:21:45 -04:00
|
|
|
before_action :no_cache_headers, except: [:index]
|
|
|
|
|
|
|
|
def index
|
|
|
|
end
|
2016-03-04 04:34:35 -05:00
|
|
|
|
2016-02-09 07:10:16 -05:00
|
|
|
def build
|
2016-03-23 06:24:18 -04:00
|
|
|
badge = Gitlab::Badge::Build.new(project, params[:ref])
|
|
|
|
|
2016-02-09 07:10:16 -05:00
|
|
|
respond_to do |format|
|
|
|
|
format.html { render_404 }
|
|
|
|
format.svg do
|
2016-03-23 06:24:18 -04:00
|
|
|
send_data(badge.data, type: badge.type, disposition: 'inline')
|
2016-02-09 07:10:16 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|