Files
hearth/package/gitea/source/routers/api/v1/misc/version.go
T
yukkop d9b2a4e787
runner nix smoke / nix label and flake smoke (push) Failing after 1m28s
feat: update gitea vendor
2026-09-26 21:18:24 +00:00

26 lines
618 B
Go

// Copyright 2017 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package misc
import (
"net/http"
"gitea.dev/modules/setting"
"gitea.dev/modules/structs"
"gitea.dev/services/context"
)
// Version shows the version of the Gitea server
func Version(ctx *context.APIContext) {
// swagger:operation GET /version miscellaneous getVersion
// ---
// summary: Returns the version of the Gitea application
// produces:
// - application/json
// responses:
// "200":
// "$ref": "#/responses/ServerVersion"
ctx.JSON(http.StatusOK, &structs.ServerVersion{Version: setting.AppVer})
}