Browse Source

#209

feature/209
みてるぞ 1 day ago
parent
commit
c37f14d9ca
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      backend/app/controllers/posts_controller.rb

+ 2
- 2
backend/app/controllers/posts_controller.rb View File

@@ -81,7 +81,7 @@ class PostsController < ApplicationController
# TODO: URL が正規のものがチェック,不正ならエラー
# TODO: URL は必須にする(タイトルは省略可).
# TODO: サイトに応じて thumbnail_base 設定
title = params[:title]
title = params[:title].presence
url = params[:url]
thumbnail = params[:thumbnail]
tag_names = params[:tags].to_s.split(' ')
@@ -122,7 +122,7 @@ class PostsController < ApplicationController
return head :unauthorized unless current_user
return head :forbidden unless current_user.member?

title = params[:title]
title = params[:title].presence
tag_names = params[:tags].to_s.split(' ')
original_created_from = params[:original_created_from]
original_created_before = params[:original_created_before]


Loading…
Cancel
Save