add template show api

dev_hjm_a
p31729568 5 years ago
parent 707d3c08ed
commit acd913a588

@ -0,0 +1,5 @@
class TemplatesController < ApplicationController
def show
@template = EcTemplate.find_by_name!(params[:name])
end
end

@ -0,0 +1,3 @@
json.template do
json.partial! 'attachments/attachment_simple', attachment: @template.attachments.last
end

@ -818,6 +818,7 @@ Rails.application.routes.draw do
post :feedback
end
end
resource :template, only: [:show]
end
namespace :admins do

Loading…
Cancel
Save