Skip to content

Commit

Permalink
Implement /meta API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
takezoe committed Oct 30, 2022
1 parent 5a0f9f8 commit 753403b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/scala/gitbucket/core/controller/ApiController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,16 @@ trait ApiControllerBase extends ControllerBase {
get("/api/v3/gitbucket/plugins") {
PluginRegistry().getPlugins().map { ApiPlugin(_) }
}

/**
* https://docs.github.com/en/enterprise-server@2.21/rest/reference/meta#get-github-enterprise-server-meta-information
*/
get("/api/v3/meta") {
JsonFormat(
Map(
"https://api.github.com/meta" -> context.loginAccount.isDefined,
"installed_version" -> "2.21.0"
)
)
}
}

0 comments on commit 753403b

Please sign in to comment.