mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 06:03:51 +03:00
Remove unused funcs and structs
This commit is contained in:
parent
51cb9aded0
commit
7790e98f47
1 changed files with 0 additions and 12 deletions
|
@ -4,7 +4,6 @@
|
||||||
package forgefed
|
package forgefed
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.gitea.io/gitea/modules/context"
|
|
||||||
ap "github.com/go-ap/activitypub"
|
ap "github.com/go-ap/activitypub"
|
||||||
"github.com/valyala/fastjson"
|
"github.com/valyala/fastjson"
|
||||||
)
|
)
|
||||||
|
@ -36,24 +35,13 @@ type Star struct {
|
||||||
Source SourceType `jsonld:"source,omitempty"`
|
Source SourceType `jsonld:"source,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Infos needed to star a repo
|
|
||||||
type StarRepo struct {
|
|
||||||
StargazerID int `json:"Stargazer"`
|
|
||||||
RepoID int `json:"RepoToStar"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// StarNew initializes a Star type activity
|
// StarNew initializes a Star type activity
|
||||||
// Guess: no return value needed, we may need to add the star to the context
|
|
||||||
func StarNew(id ap.ID, ob ap.ID) *Star {
|
func StarNew(id ap.ID, ob ap.ID) *Star {
|
||||||
a := ap.ActivityNew(id, StarType, ob)
|
a := ap.ActivityNew(id, StarType, ob)
|
||||||
o := Star{Activity: *a, Source: ForgejoSourceType}
|
o := Star{Activity: *a, Source: ForgejoSourceType}
|
||||||
return &o
|
return &o
|
||||||
}
|
}
|
||||||
|
|
||||||
func AddStar(ctx *context.APIContext) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a Star) MarshalJSON() ([]byte, error) {
|
func (a Star) MarshalJSON() ([]byte, error) {
|
||||||
b := make([]byte, 0)
|
b := make([]byte, 0)
|
||||||
ap.JSONWrite(&b, '{')
|
ap.JSONWrite(&b, '{')
|
||||||
|
|
Loading…
Reference in a new issue