aboutsummaryrefslogtreecommitdiffstats
path: root/routers/api/v1/misc
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-04-08 12:22:10 +0800
committerGitHub <noreply@github.com>2022-04-08 06:22:10 +0200
commit3c3d49899f0f7206e190bdeecdc4da248cc7e686 (patch)
tree7d1f57f7655142b47b5adeb197943c74c1e6f8c9 /routers/api/v1/misc
parent75f8534c3a8678f4b55e557960450230cf909b93 (diff)
downloadgitea-3c3d49899f0f7206e190bdeecdc4da248cc7e686.tar.gz
gitea-3c3d49899f0f7206e190bdeecdc4da248cc7e686.zip
Remove dependent on session auth for api/v1 routers (#19321)
* Remove dependent on session auth for api/v1 routers * Remove unnecessary session on API context * remove missed header * fix test * fix missed api/v1
Diffstat (limited to 'routers/api/v1/misc')
-rw-r--r--routers/api/v1/misc/swagger.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/routers/api/v1/misc/swagger.go b/routers/api/v1/misc/swagger.go
deleted file mode 100644
index e46d4194b4..0000000000
--- a/routers/api/v1/misc/swagger.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2017 The Gitea Authors. All rights reserved.
-// Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
-
-package misc
-
-import (
- "net/http"
-
- "code.gitea.io/gitea/modules/base"
- "code.gitea.io/gitea/modules/context"
-)
-
-// tplSwagger swagger page template
-const tplSwagger base.TplName = "swagger/ui"
-
-// Swagger render swagger-ui page with v1 json
-func Swagger(ctx *context.Context) {
- ctx.Data["APIJSONVersion"] = "v1"
- ctx.HTML(http.StatusOK, tplSwagger)
-}