Add Function description
This commit is contained in:
parent
689837b63a
commit
e4242dafd9
|
@ -22,6 +22,13 @@ import (
|
|||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// LikeActivity receives a ForgeLike activity and does the following:
|
||||
// Validation of the activity
|
||||
// Creation of a (remote) federationHost if not existing
|
||||
// Creation of a forgefed Person if not existing
|
||||
// Validation of incoming RepositoryID against Local RepositoryID
|
||||
// Star the repo if it wasn't already stared
|
||||
// Do some mitigation against out of order attacks
|
||||
func LikeActivity(ctx *context.APIContext, form any, repositoryID int64) (int, string, error) {
|
||||
activity := form.(*forgefed.ForgeLike)
|
||||
if res, err := validation.IsValid(activity); !res {
|
||||
|
|
Loading…
Reference in New Issue