forked from NYANDEV/forgejo
Backport #27265 by @JakobDev Part of #27065 This PR touches functions used in templates. As templates are not static typed, errors are harder to find, but I hope I catch it all. I think some tests from other persons do not hurt. Co-authored-by: JakobDev <jakobdev@gmx.de>
This commit is contained in:
parent
84ee02faa7
commit
f13a294b47
66 changed files with 455 additions and 456 deletions
|
@ -82,11 +82,11 @@ func UpdateExternalUser(user *user_model.User, gothUser goth.User) error {
|
|||
|
||||
// UpdateMigrationsByType updates all migrated repositories' posterid from gitServiceType to replace originalAuthorID to posterID
|
||||
func UpdateMigrationsByType(ctx context.Context, tp structs.GitServiceType, externalUserID string, userID int64) error {
|
||||
if err := issues_model.UpdateIssuesMigrationsByType(tp, externalUserID, userID); err != nil {
|
||||
if err := issues_model.UpdateIssuesMigrationsByType(ctx, tp, externalUserID, userID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := issues_model.UpdateCommentsMigrationsByType(tp, externalUserID, userID); err != nil {
|
||||
if err := issues_model.UpdateCommentsMigrationsByType(ctx, tp, externalUserID, userID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -94,8 +94,8 @@ func UpdateMigrationsByType(ctx context.Context, tp structs.GitServiceType, exte
|
|||
return err
|
||||
}
|
||||
|
||||
if err := issues_model.UpdateReactionsMigrationsByType(tp, externalUserID, userID); err != nil {
|
||||
if err := issues_model.UpdateReactionsMigrationsByType(ctx, tp, externalUserID, userID); err != nil {
|
||||
return err
|
||||
}
|
||||
return issues_model.UpdateReviewsMigrationsByType(tp, externalUserID, userID)
|
||||
return issues_model.UpdateReviewsMigrationsByType(ctx, tp, externalUserID, userID)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue