parent
b0e344b170
commit
9a3a330b1d
1 changed files with 13 additions and 0 deletions
|
@ -406,6 +406,19 @@ func handleAccept(w http.ResponseWriter, r *http.Request, object map[string]any)
|
||||||
dbrel := dbgen.UserToUserRelation
|
dbrel := dbgen.UserToUserRelation
|
||||||
_, err = dbrel.Where(dbrel.ID.Eq(relationId)).
|
_, err = dbrel.Where(dbrel.ID.Eq(relationId)).
|
||||||
UpdateColumn(dbrel.Relation, models.RelationFollow)
|
UpdateColumn(dbrel.Relation, models.RelationFollow)
|
||||||
|
switch err {
|
||||||
|
case gorm.ErrRecordNotFound:
|
||||||
|
webutils.ProblemDetailsStatusOnly(w, http.StatusNotFound)
|
||||||
|
return
|
||||||
|
case nil:
|
||||||
|
default:
|
||||||
|
log.Error().
|
||||||
|
Err(err).
|
||||||
|
Str("target-id", internalId).
|
||||||
|
Msg("Failed to get target follow activity from db")
|
||||||
|
webutils.ProblemDetailsStatusOnly(w, http.StatusInternalServerError)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleReject(w http.ResponseWriter, r *http.Request, object map[string]any) {}
|
func handleReject(w http.ResponseWriter, r *http.Request, object map[string]any) {}
|
||||||
|
|
Loading…
Reference in a new issue