本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
696B

  1. // Copyright 2017 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package misc
  5. import (
  6. "code.gitea.io/gitea/modules/context"
  7. "code.gitea.io/gitea/modules/setting"
  8. "code.gitea.io/gitea/modules/structs"
  9. )
  10. // Version shows the version of the Gitea server
  11. func Version(ctx *context.APIContext) {
  12. // swagger:operation GET /version miscellaneous getVersion
  13. // ---
  14. // summary: Returns the version of the Gitea application
  15. // produces:
  16. // - application/json
  17. // responses:
  18. // "200":
  19. // "$ref": "#/responses/ServerVersion"
  20. ctx.JSON(200, &structs.ServerVersion{Version: setting.AppVer})
  21. }
上海开阖软件有限公司 沪ICP备12045867号-1