Skip to content

Commit

Permalink
Fix typo in queriesExecutionsInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIvanoff committed Jan 21, 2025
1 parent 179db66 commit 26367d8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/sanbase_web/graphql/resolvers/user/user_resolver.ex
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ defmodule SanbaseWeb.Graphql.Resolvers.UserResolver do
Sanbase.Queries.Authorization.query_executions_limit(subscription_product, plan_name)

result = %{
credits_availalbe_month: credits_limit,
credits_available_month: credits_limit,
credits_spent_month: details.monthly_credits_spent,
credits_remaining_month: credits_limit - details.monthly_credits_spent,
queries_executed_month: details.queries_executed_month,
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/graphql/schema/types/user_types.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ defmodule SanbaseWeb.Graphql.UserTypes do
end

object :queries_executions_info do
field(:credits_availalbe_month, non_null(:integer))
field(:credits_available_month, non_null(:integer))
field(:credits_spent_month, non_null(:integer))
field(:credits_remaining_month, non_null(:integer))
field(:queries_executed_month, non_null(:integer))
Expand Down
6 changes: 3 additions & 3 deletions test/sanbase_web/graphql/queries/queries_api_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ defmodule SanbaseWeb.Graphql.QueriesApiTest do
|> get_in(["data", "currentUser", "queriesExecutionsInfo"])

assert stats == %{
"creditsAvailalbeMonth" => 500,
"creditsAvailableMonth" => 500,
"creditsRemainingMonth" => 499,
"creditsSpentMonth" => 1,
"queriesExecutedDay" => 1,
Expand Down Expand Up @@ -334,7 +334,7 @@ defmodule SanbaseWeb.Graphql.QueriesApiTest do
assert Process.get(:queries_dynamic_repo) == Sanbase.ClickhouseRepo.BusinessMaxUser

assert stats == %{
"creditsAvailalbeMonth" => 500_000,
"creditsAvailableMonth" => 500_000,
"creditsRemainingMonth" => 499_999,
"creditsSpentMonth" => 1,
"queriesExecutedDay" => 1,
Expand All @@ -357,7 +357,7 @@ defmodule SanbaseWeb.Graphql.QueriesApiTest do
currentUser {
queriesExecutionsInfo {
# credits info
creditsAvailalbeMonth
creditsAvailableMonth
creditsSpentMonth
creditsRemainingMonth
# queries executed
Expand Down

0 comments on commit 26367d8

Please sign in to comment.