Sha256: da1db8f546381b34bc21999f6645a7b5505134b7b0621a721d700a39c787b914
Contents?: true
Size: 1009 Bytes
Versions: 3
Compression:
Stored size: 1009 Bytes
Contents
require_relative "lib/easycomments.rb" require_relative "lib/easycomments/ec_dashboard_model.rb" class ECDashboard < Sinatra::Application include ECDashboardModel before do content_type 'application/json' end get "/" do content_type 'text/html' send_file 'views/index.html' end post '/login' do authenticate(params[:username], params[:password]) end get "/comments" do get_comments(params[:post]) end get '/get_all_posts' do get_all_posts end post '/edit_comment' do edit_comment(params[:id], params[:new_body]) end post '/remove_comment' do remove_comment(params[:id]) end post '/change_approval_status' do comment_change_approval(params[:id]) end get '/get_total_pending' do get_total_pending end get '/get_posts_with_pending' do get_posts_with_pending end get '/get_pending_comments' do get_pending_comments(params[:post]) end post '/ignore_comment' do ignore_comment(params[:id]) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
easycomments-1.0.3 | dashboard.rb |
easycomments-1.0.2 | dashboard.rb |
easycomments-1.0.1 | dashboard.rb |