mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 08:59:31 -05:00
Use data from actor, improve formatting
This commit is contained in:
parent
aee2ee2596
commit
34c511ae98
1 changed files with 9 additions and 3 deletions
|
@ -105,11 +105,17 @@ func RepositoryInbox(ctx *context.APIContext) {
|
||||||
log.Info("RepositoryInbox: Actor parsed. %v", actor)
|
log.Info("RepositoryInbox: Actor parsed. %v", actor)
|
||||||
|
|
||||||
// get_person_by_rest
|
// get_person_by_rest
|
||||||
c := api.NewHTTPClientWithConfig(strfmt.Default,
|
c := api.NewHTTPClientWithConfig(
|
||||||
api.DefaultTransportConfig().WithHost("localhost:3000").WithBasePath("/api/v1/").WithSchemes([]string{"http"}))
|
strfmt.Default,
|
||||||
|
api.DefaultTransportConfig().
|
||||||
|
WithHost(actor.GetHostAndPort()).
|
||||||
|
WithBasePath("/api/v1/"). // ToDo: Is there a need to get the base path dynamically?
|
||||||
|
WithSchemes([]string{"http", "https"}))
|
||||||
//c := client.Default
|
//c := client.Default
|
||||||
|
|
||||||
person, err := c.Activitypub.ActivitypubPerson(
|
person, err := c.Activitypub.ActivitypubPerson(
|
||||||
apiPerson.NewActivitypubPersonParams().WithUserID(1), nil)
|
apiPerson.NewActivitypubPersonParams().
|
||||||
|
WithUserID(int64(actor.GetUserId())), nil)
|
||||||
|
|
||||||
log.Info("http client. %v", c)
|
log.Info("http client. %v", c)
|
||||||
log.Info("person: %v\n error: ", person, err)
|
log.Info("person: %v\n error: ", person, err)
|
||||||
|
|
Loading…
Reference in a new issue