mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 11:01:49 +01:00
Add Function description
This commit is contained in:
parent
689837b63a
commit
e4242dafd9
1 changed files with 7 additions and 0 deletions
|
@ -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 a new issue