forgejo/routers/api/v1/foundation/foundation.go
2025-01-12 09:09:36 +01:00

32 lines
740 B
Go

// Copyright 2025 Milovann Yanatchkov
// SPDX-License-Identifier: GPL-3.0-or-later
package foundation
import (
"net/http"
api "code.gitea.io/gitea/modules/structs"
"code.gitea.io/gitea/services/context"
)
// Get Foundation ID
func GetVersions(ctx *context.APIContext) {
// swagger:operation GET /foundation/versions foundation foundationVersions
// ---
// summary: Get foundation versions
// produces:
// - application/json
// responses:
// "200":
// "$ref": "#/responses/Foundation"
// "401":
// "$ref": "#/responses/unauthorized"
// "403":
// "$ref": "#/responses/forbidden"
// "404":
// "$ref": "#/responses/notFound"
f := api.Foundation{1, 1, "http", "http"}
ctx.JSON(http.StatusOK, f)
}