@@ -23,6 +23,7 @@ defmodule Codebattle.User do
23
23
only: [
24
24
:achievements ,
25
25
:avatar_url ,
26
+ :category ,
26
27
:clan ,
27
28
:clan_id ,
28
29
:editor_mode ,
@@ -49,6 +50,7 @@ defmodule Codebattle.User do
49
50
field ( :achievements , { :array , :string } , default: [ ] )
50
51
field ( :auth_token , :string )
51
52
field ( :avatar_url , :string )
53
+ field ( :category , :string )
52
54
field ( :clan , :string )
53
55
field ( :clan_id , :integer )
54
56
field ( :collab_logo , :string )
@@ -58,6 +60,7 @@ defmodule Codebattle.User do
58
60
field ( :editor_mode , :string )
59
61
field ( :editor_theme , :string )
60
62
field ( :email , :string )
63
+ field ( :external_oauth_id , :string )
61
64
field ( :firebase_uid , :string )
62
65
field ( :github_id , :integer )
63
66
field ( :github_name , :string )
@@ -88,12 +91,14 @@ defmodule Codebattle.User do
88
91
:achievements ,
89
92
:auth_token ,
90
93
:avatar_url ,
94
+ :category ,
91
95
:discord_avatar ,
92
96
:discord_id ,
93
97
:discord_name ,
94
98
:editor_mode ,
95
99
:editor_theme ,
96
100
:email ,
101
+ :external_oauth_id ,
97
102
:firebase_uid ,
98
103
:github_id ,
99
104
:github_name ,
@@ -120,7 +125,7 @@ defmodule Codebattle.User do
120
125
121
126
def token_changeset ( user , params \\ % { } ) do
122
127
user
123
- |> cast ( params , [ :auth_token , :name , :clan , :subscription_type ] )
128
+ |> cast ( params , [ :external_oauth_id , :category , :name , :clan , :subscription_type ] )
124
129
|> cast_embed ( :sound_settings )
125
130
|> unique_constraint ( :name )
126
131
|> validate_length ( :name , min: 2 , max: 39 )
0 commit comments