summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-12-03 15:05:48 +0100
committerGitHub <noreply@github.com>2020-12-03 16:05:48 +0200
commit4353cf96c003cf55adfaf28b494a9d78c5226202 (patch)
tree15a80476df2ec0f0aefcca71385c9873752b96e1 /models
parente306c292ac478c0f09b2c02908e485132669aacb (diff)
downloadgitea-4353cf96c003cf55adfaf28b494a9d78c5226202.tar.gz
gitea-4353cf96c003cf55adfaf28b494a9d78c5226202.zip
Move LFSLock APIFormat into convert package (#13808)
Diffstat (limited to 'models')
-rw-r--r--models/lfs_lock.go14
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)