kopia lustrzana https://github.com/reiver/greatape
18 wiersze
400 B
Go
18 wiersze
400 B
Go
package commands
|
|
|
|
import . "github.com/reiver/greatape/components/contracts"
|
|
|
|
func GetProfileByUser(x IDispatcher) (IGetProfileByUserResult, error) {
|
|
identity := x.Identity().(IIdentity)
|
|
user := x.GetUser(identity.Id())
|
|
|
|
return x.NewGetProfileByUserResult(
|
|
identity.Username(),
|
|
identity.DisplayName(),
|
|
identity.Avatar(),
|
|
identity.Banner(),
|
|
identity.Summary(),
|
|
user.Github(),
|
|
), nil
|
|
}
|