This repository was archived by the owner on Nov 8, 2022. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork20
refactor(user): move users query to own fields#371
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
14 commits Select commitHold shift + click to select a range
5e9d692
refactor(user): contribute field
mydearxymba1fd61
refactor(user): default contributes
mydearxym8f6df86
refactor(user): default contributes
mydearxyme3df213
fix(user): contrutess model setting
mydearxym21642a2
refactor(user): wip
mydearxym0b19ed3
refactor(user): basic follower status
mydearxym2953902
refactor(user): wip
mydearxymbb6055d
refactor(user): follow states for paged api
mydearxym916fd52
refactor(user): follow count move to table
mydearxymd2c84a3
refactor(user): follow queries use login
mydearxymde7f384
fix(user): login args in test
mydearxymc5433e7
fix(user): login args in test
mydearxym9f61d1f
fix(user): login args in test
mydearxym47d575a
fix(user): login args in test
mydearxymFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletioncover/excoveralls.json
Large diffs are not rendered by default.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
11 changes: 9 additions & 2 deletionslib/groupher_server/accounts/accounts.ex
This file contains hidden or 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
195 changes: 136 additions & 59 deletionslib/groupher_server/accounts/delegates/fans.ex
This file contains hidden or 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
49 changes: 45 additions & 4 deletionslib/groupher_server/accounts/delegates/profile.ex
This file contains hidden or 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
25 changes: 25 additions & 0 deletionslib/groupher_server/accounts/embeds/user_contribute.ex
This file contains hidden or 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,25 @@ | ||
defmodule GroupherServer.Accounts.Embeds.UserContribute do | ||
@moduledoc """ | ||
user contribute | ||
""" | ||
use Ecto.Schema | ||
use Accessible | ||
import Ecto.Changeset | ||
alias GroupherServer.Accounts.Embeds | ||
@optional_fields ~w(reported_count)a | ||
embedded_schema do | ||
field(:start_date, :date) | ||
field(:end_date, :date) | ||
field(:total_count, :integer, default: 0) | ||
embeds_many(:records, Embeds.UserContributeRecord, on_replace: :delete) | ||
end | ||
def changeset(struct, params) do | ||
struct | ||
|> cast(params, @optional_fields) | ||
|> cast_embed(:records, with: &Embeds.UserContributeRecord.changeset/2) | ||
end | ||
end |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.