Slack's new api

This commit is contained in:
Petko Bordjukov 2023-10-30 21:08:38 +02:00
parent 14dacf02c1
commit b80eab40cc
3 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,7 @@
class Api::ConferencesController < Api::ApplicationController
include ::PublicApiExposing
def index
@conferences = Conference.all
end
end

View File

@ -0,0 +1 @@
json.array! @conferences, :id, :title, :start_date, :end_date, :created_at, :updated_at

View File

@ -17,7 +17,7 @@ Rails.application.routes.draw do
end end
namespace :api do namespace :api do
resources :conferences, only: [] do resources :conferences, only: [:index] do
resources :events, only: :index do resources :events, only: :index do
collection do collection do
get :halfnarp_friendly get :halfnarp_friendly