-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
222 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# App artifacts | ||
_build | ||
deps | ||
db | ||
.idea | ||
*.ez | ||
*.retry | ||
*.log | ||
tmp | ||
*.elixir_ls/ | ||
*deployment.retry | ||
*~ | ||
*.swp | ||
*.swo | ||
.vscode | ||
**/__pycache__ | ||
# Generated on crash by the VM | ||
erl_crash.dump | ||
|
||
# Static artifacts | ||
node_modules | ||
|
||
# Since we are building assets from web/static, | ||
# we ignore priv/static. You may want to comment | ||
# this depending on your deployment strategy. | ||
/priv/static | ||
|
||
# The config/prod.secret.exs file by default contains sensitive | ||
# data and you should not commit it into version control. | ||
# | ||
# Alternatively, you may comment the line below and commit the | ||
# secrets file as long as you replace its contents by environment | ||
# variables. | ||
services/app/config/prod.secret.exs | ||
tags | ||
.vagrant | ||
*.DS_Store | ||
.env | ||
.deliver/config | ||
|
||
# Generated reports | ||
cover | ||
.deliver/releases/ | ||
.tern-port | ||
*.backup | ||
.terraform | ||
secrets.auto.tfvars | ||
.cache-loader | ||
*.tfstate | ||
*.secret.yml | ||
.elixir_ls | ||
google.key.json | ||
.iml | ||
|
||
.kube/ | ||
kubeconfig.yml | ||
|
||
stats.json | ||
*.hcl | ||
services/app/priv/plts/*.plt | ||
services/app/priv/plts/*.plt.hash |
3 changes: 2 additions & 1 deletion
3
services/app/apps/codebattle/assets/js/widgets/config/subscriptionTypes.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
const subscriptionTypes = { | ||
admin: 'admin', | ||
banned: 'banned', | ||
free: 'free', | ||
premium: 'premium', | ||
admin: 'admin', | ||
}; | ||
|
||
export default subscriptionTypes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
services/app/apps/codebattle/lib/codebattle/user/sound_settings.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
defmodule User.SoundSettings do | ||
use Ecto.Schema | ||
|
||
import Ecto.Changeset | ||
@primary_key false | ||
|
||
@types ~w(cs dendy standard silent) | ||
|
||
@derive {Jason.Encoder, only: [:level, :type]} | ||
|
||
embedded_schema do | ||
field(:level, :integer, default: 7) | ||
field(:type, :string, default: "dendy") | ||
end | ||
|
||
def changeset(struct, params) do | ||
struct | ||
|> cast(params, [:level, :type]) | ||
|> validate_length(:level, greater_than_or_equal_to: 0, less_than_or_equal_to: 10) | ||
|> validate_inclusion(:type, @types) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.