Skip to content

Commit bd36521

Browse files
committed
CV2-6701: add settings to team
1 parent 420b178 commit bd36521

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

app/graph/types/team_type.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ class TeamType < DefaultObject
1313
field :dbid, GraphQL::Types::Int, null: true
1414
field :members_count, GraphQL::Types::Int, null: true
1515
field :permissions, GraphQL::Types::String, null: true
16-
field :get_embed_whitelist, GraphQL::Types::String, null: true
17-
field :get_report_design_image_template, GraphQL::Types::String, null: true
18-
field :get_status_target_turnaround, GraphQL::Types::String, null: true
1916
field :search_id, GraphQL::Types::String, null: true
2017
field :search, CheckSearchType, null: true
2118
field :check_search_trash, CheckSearchType, null: true
@@ -25,7 +22,6 @@ class TeamType < DefaultObject
2522
field :public_team_id, GraphQL::Types::String, null: true
2623
field :permissions_info, JsonStringType, null: true
2724
field :dynamic_search_fields_json_schema, JsonStringType, null: true
28-
field :get_rules, JsonStringType, null: true
2925
field :rules_json_schema, GraphQL::Types::String, null: true
3026
field :rules_search_fields_json_schema, JsonStringType, null: true
3127
field :medias_count, GraphQL::Types::Int, null: true
@@ -34,7 +30,6 @@ class TeamType < DefaultObject
3430
field :unconfirmed_count, GraphQL::Types::Int, null: true
3531
field :get_language_detection, GraphQL::Types::Boolean, null: true
3632
field :get_report, JsonStringType, null: true
37-
field :get_fieldsets, JsonStringType, null: true
3833
field :url, GraphQL::Types::String, null: true
3934
field :data_report, JsonStringType, null: true
4035
field :available_newsletter_header_types, JsonStringType, null: true # List of header type strings
@@ -126,6 +121,12 @@ def get_explainers_enabled
126121
object.get_explainers_enabled
127122
end
128123

124+
field :get_tipline_newsletter_enabled, GraphQL::Types::Boolean, null: true
125+
126+
def get_tipline_newsletter_enabled
127+
object.get_tipline_newsletter_enabled
128+
end
129+
129130
field :public_team, PublicTeamType, null: true
130131

131132
def public_team

app/workers/tipline_newsletter_worker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def perform(team_id, language, job_created_at = 0)
3737
start = Time.now
3838
total = 0
3939
limit = team.get_tipline_newsletter_subscribers_limit
40-
query = TiplineSubscription.where(language: language, team_id: team_id
40+
query = TiplineSubscription.where(language: language, team_id: team_id)
4141
query = query.limit(limit) unless limit.nil?
4242
query.each do |ts|
4343
log team_id, language, "Sending newsletter to subscriber ##{ts.id}..."

lib/relay.idl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12602,6 +12602,7 @@ type Team implements Node {
1260212602
get_status_target_turnaround: String
1260312603
get_suggested_matches_filters: JsonStringType
1260412604
get_tipline_inbox_filters: JsonStringType
12605+
get_tipline_newsletter_enabled: Boolean
1260512606
id: ID!
1260612607
inactive: Boolean
1260712608
join_requests(

public/relay.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65815,6 +65815,20 @@
6581565815
"isDeprecated": false,
6581665816
"deprecationReason": null
6581765817
},
65818+
{
65819+
"name": "get_tipline_newsletter_enabled",
65820+
"description": null,
65821+
"args": [
65822+
65823+
],
65824+
"type": {
65825+
"kind": "SCALAR",
65826+
"name": "Boolean",
65827+
"ofType": null
65828+
},
65829+
"isDeprecated": false,
65830+
"deprecationReason": null
65831+
},
6581865832
{
6581965833
"name": "id",
6582065834
"description": null,

0 commit comments

Comments
 (0)