aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/admin/admin.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2021-07-25 00:03:58 +0800
committerGitHub <noreply@github.com>2021-07-24 18:03:58 +0200
commit9f31f3aa8ac4f6bfc8390c9ae63b2a387b414c88 (patch)
tree6f27dc68a35d1f9d806c632e36f0edc8543184ea /routers/web/admin/admin.go
parente0f9635c0691cb67f0fcbb758cabba801d9fc51b (diff)
downloadgitea-9f31f3aa8ac4f6bfc8390c9ae63b2a387b414c88.tar.gz
gitea-9f31f3aa8ac4f6bfc8390c9ae63b2a387b414c88.zip
Add an abstract json layout to make it's easier to change json library (#16528)
* Add an abstract json layout to make it's easier to change json library * Fix import * Fix import sequence * Fix blank lines * Fix blank lines
Diffstat (limited to 'routers/web/admin/admin.go')
-rw-r--r--routers/web/admin/admin.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/routers/web/admin/admin.go b/routers/web/admin/admin.go
index c2d94ab9c9..125bef9b53 100644
--- a/routers/web/admin/admin.go
+++ b/routers/web/admin/admin.go
@@ -20,6 +20,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/cron"
"code.gitea.io/gitea/modules/git"
+ "code.gitea.io/gitea/modules/json"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/process"
"code.gitea.io/gitea/modules/queue"
@@ -28,7 +29,6 @@ import (
"code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/services/forms"
"code.gitea.io/gitea/services/mailer"
- jsoniter "github.com/json-iterator/go"
"gitea.com/go-chi/session"
)
@@ -275,7 +275,6 @@ func Config(ctx *context.Context) {
sessionCfg := setting.SessionConfig
if sessionCfg.Provider == "VirtualSession" {
var realSession session.Options
- json := jsoniter.ConfigCompatibleWithStandardLibrary
if err := json.Unmarshal([]byte(sessionCfg.ProviderConfig), &realSession); err != nil {
log.Error("Unable to unmarshall session config for virtualed provider config: %s\nError: %v", sessionCfg.ProviderConfig, err)
}