diff options
author | 6543 <6543@obermui.de> | 2020-12-03 15:05:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 16:05:48 +0200 |
commit | 4353cf96c003cf55adfaf28b494a9d78c5226202 (patch) | |
tree | 15a80476df2ec0f0aefcca71385c9873752b96e1 /models | |
parent | e306c292ac478c0f09b2c02908e485132669aacb (diff) | |
download | gitea-4353cf96c003cf55adfaf28b494a9d78c5226202.tar.gz gitea-4353cf96c003cf55adfaf28b494a9d78c5226202.zip |
Move LFSLock APIFormat into convert package (#13808)
Diffstat (limited to 'models')
-rw-r--r-- | models/lfs_lock.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/models/lfs_lock.go b/models/lfs_lock.go index 3e56a7960b..913c54a49c 100644 --- a/models/lfs_lock.go +++ b/models/lfs_lock.go @@ -7,12 +7,10 @@ package models import ( "fmt" "path" - "strconv" "strings" "time" "code.gitea.io/gitea/modules/log" - api "code.gitea.io/gitea/modules/structs" "xorm.io/xorm" ) @@ -52,18 +50,6 @@ func cleanPath(p string) string { return path.Clean("/" + p)[1:] } -// APIFormat convert a Release to lfs.LFSLock -func (l *LFSLock) APIFormat() *api.LFSLock { - return &api.LFSLock{ - ID: strconv.FormatInt(l.ID, 10), - Path: l.Path, - LockedAt: l.Created.Round(time.Second), - Owner: &api.LFSLockOwner{ - Name: l.Owner.DisplayName(), - }, - } -} - // CreateLFSLock creates a new lock. func CreateLFSLock(lock *LFSLock) (*LFSLock, error) { err := CheckLFSAccessForRepo(lock.Owner, lock.Repo, AccessModeWrite) |