diff options
Diffstat (limited to 'routers/api/v1/misc/version.go')
-rw-r--r-- | routers/api/v1/misc/version.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/routers/api/v1/misc/version.go b/routers/api/v1/misc/version.go new file mode 100644 index 0000000000..92950c19c3 --- /dev/null +++ b/routers/api/v1/misc/version.go @@ -0,0 +1,16 @@ +// 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 ( + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/sdk/gitea" +) + +// Version shows the version of the Gitea server +func Version(ctx *context.APIContext) { + ctx.JSON(200, &gitea.ServerVersion{Version: setting.AppVer}) +} |