mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Code Formats, Nits & Unused Func/Var deletions (#15286)
* _ to unused func options * rm useless brakets * rm trifial non used models functions * rm dead code * rm dead global vars * fix routers/api/v1/repo/issue.go * dont overload import module
This commit is contained in:
@@ -131,11 +131,11 @@ func (repo *Repository) CountLFSMetaObjects() (int64, error) {
|
||||
func LFSObjectAccessible(user *User, oid string) (bool, error) {
|
||||
if user.IsAdmin {
|
||||
count, err := x.Count(&LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}})
|
||||
return (count > 0), err
|
||||
return count > 0, err
|
||||
}
|
||||
cond := accessibleRepositoryCondition(user)
|
||||
count, err := x.Where(cond).Join("INNER", "repository", "`lfs_meta_object`.repository_id = `repository`.id").Count(&LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}})
|
||||
return (count > 0), err
|
||||
return count > 0, err
|
||||
}
|
||||
|
||||
// LFSAutoAssociate auto associates accessible LFSMetaObjects
|
||||
|
Reference in New Issue
Block a user