グカネータ公開 (#361) (#368)

Reviewed-on: #368
Co-authored-by: miteruzo <miteruzo@naver.com>
Co-committed-by: miteruzo <miteruzo@naver.com>
このコミットはPull リクエスト #368 でマージされました.
このコミットが含まれているのは:
2026-06-14 05:33:39 +09:00
committed by みてるぞ
コミット 7ab46f907f
23個のファイルの変更3573行の追加466行の削除
+4 -1
ファイルの表示
@@ -1,9 +1,12 @@
class GekanatorQuestionSuggestionsController < ApplicationController
def create
return head :not_found unless current_user&.admin?
return head :unauthorized unless current_user
game = GekanatorGame.find_by(id: params.require(:gekanator_game_id))
return head :not_found unless game
if !current_user.admin? && game.user_id != current_user.id
return head :not_found
end
suggestion = GekanatorQuestionSuggestion.new(
gekanator_game: game,