9a5720e8ad
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Branch Policy Check / Verify merge target (pull_request) Successful in 1s
PR RC Release / Build RC Release (pull_request) Successful in 3s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Full namespace migration: update the Go module path and all import statements from git.mokoconsulting.tech to code.mokoconsulting.tech. Also updates all URL references in templates, workflows, configs, tests, and documentation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package common
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/web"
|
|
"code.mokoconsulting.tech/MokoConsulting/MokoGitea/services/lfs"
|
|
)
|
|
|
|
const RouterMockPointCommonLFS = "common-lfs"
|
|
|
|
func AddOwnerRepoGitLFSRoutes(m *web.Router, middlewares ...any) {
|
|
// shared by web and internal routers
|
|
m.Group("/{username}/{reponame}/info/lfs", func() {
|
|
m.Post("/objects/batch", lfs.CheckAcceptMediaType, lfs.BatchHandler)
|
|
m.Put("/objects/{oid}/{size}", lfs.UploadHandler)
|
|
m.Get("/objects/{oid}/{filename}", lfs.DownloadHandler)
|
|
m.Get("/objects/{oid}", lfs.DownloadHandler)
|
|
m.Post("/verify", lfs.CheckAcceptMediaType, lfs.VerifyHandler)
|
|
m.Group("/locks", func() {
|
|
m.Get("/", lfs.GetListLockHandler)
|
|
m.Post("/", lfs.PostLockHandler)
|
|
m.Post("/verify", lfs.VerifyLockHandler)
|
|
m.Post("/{lid}/unlock", lfs.UnLockHandler)
|
|
}, lfs.CheckAcceptMediaType)
|
|
m.Any("/*", http.NotFound)
|
|
}, append([]any{web.RouterMockPoint(RouterMockPointCommonLFS)}, middlewares...)...)
|
|
}
|