Update WelcomeController's daily_threads query (#18203)
This commit is contained in:
parent
cfd7e7631e
commit
0c8fc2ea0d
1 changed files with 5 additions and 1 deletions
|
|
@ -3,7 +3,11 @@ module Admin
|
|||
layout "admin"
|
||||
|
||||
def index
|
||||
@daily_threads = Article.where("title LIKE 'Welcome Thread - %'")
|
||||
@daily_threads = if User.staff_account
|
||||
Article.where("title LIKE 'Welcome Thread - %'").where(user_id: User.staff_account&.id)
|
||||
else
|
||||
[]
|
||||
end
|
||||
end
|
||||
|
||||
def create
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue