|
|
@ -411,6 +411,10 @@ func DeleteRepository(userId, repoId int64, userName string) (err error) { |
|
|
|
session.Rollback() |
|
|
|
session.Rollback() |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if _, err = session.Delete(&Watch{RepoId: repoId}); err != nil { |
|
|
|
|
|
|
|
session.Rollback() |
|
|
|
|
|
|
|
return err |
|
|
|
|
|
|
|
} |
|
|
|
if err = session.Commit(); err != nil { |
|
|
|
if err = session.Commit(); err != nil { |
|
|
|
session.Rollback() |
|
|
|
session.Rollback() |
|
|
|
return err |
|
|
|
return err |
|
|
|