Compare commits

..

1 Commits

Author SHA1 Message Date
Renovate Bot
9e082aa795 Update dependency ruby to v3.4.4
Some checks failed
Run unit tests / rubocop (pull_request) Failing after 3m30s
Run unit tests / unit_tests (pull_request) Failing after 5m50s
Run unit tests / build-static-assets (pull_request) Has been skipped
Run unit tests / check-licenses (pull_request) Failing after 3m49s
Run unit tests / copyright_notice (pull_request) Successful in 5m19s
2025-06-12 02:05:46 +00:00
3 changed files with 4 additions and 17 deletions

View File

@ -6,9 +6,6 @@ require 'csv'
class GuestsController < ApplicationController class GuestsController < ApplicationController
GUEST_PARAMS = { only: %i[id name status], include: { group: { only: %i[id name] } } }.freeze GUEST_PARAMS = { only: %i[id name status], include: { group: { only: %i[id name] } } }.freeze
skip_before_action :authenticate_user!, only: :update
def index def index
render json: Guest.includes(:group) render json: Guest.includes(:group)
.left_joins(:group) .left_joins(:group)
@ -34,6 +31,6 @@ class GuestsController < ApplicationController
private private
def guest_params def guest_params
user_signed_in? ? params.expect(guest: %i[name group_id status]) : params.expect(guest: %i[status]) params.expect(guest: %i[name group_id status])
end end
end end

View File

@ -2,9 +2,9 @@
# frozen_string_literal: true # frozen_string_literal: true
class InvitationsController < ApplicationController # Copyright (C) 2024-2025 LibreWeddingPlanner contributors
skip_before_action :authenticate_user!, only: :show
class InvitationsController < ApplicationController
def index def index
render json: Invitation.includes(:guests).as_json( render json: Invitation.includes(:guests).as_json(
only: :id, only: :id,
@ -16,16 +16,6 @@ class InvitationsController < ApplicationController
) )
end end
def show
invitation = Invitation.includes(:guests).find(params[:id])
if invitation
render json: invitation, only: :id, include: { guests: { only: %i[id name status] } }, status: :ok
else
render json: { error: 'Invitation not found' }, status: :not_found
end
end
def create def create
invitation = Invitation.create invitation = Invitation.create

View File

@ -42,7 +42,7 @@ Rails.application.routes.draw do
resources :tables_arrangements, only: %i[index show create] resources :tables_arrangements, only: %i[index show create]
resources :summary, only: :index resources :summary, only: :index
resources :invitations, only: %i[show index create update destroy] resources :invitations, only: %i[index create update destroy]
root to: redirect("/%{slug}") root to: redirect("/%{slug}")
end end