mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-13 13:55:14 +00:00
Tweaks to showing new version available
- Added frontend translation for english - Moved frontend api logic to hook and backend api space - Added swagger schema for the new api endpoint - Moved backend logic to its own internal file - Added user agent header to github api check - Added cypress integration test for version check api - Added a memory cache item from github check to avoid hitting it too much
This commit is contained in:
25
backend/schema/components/check-version-object.json
Normal file
25
backend/schema/components/check-version-object.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"type": "object",
|
||||
"description": "Check Version object",
|
||||
"additionalProperties": false,
|
||||
"required": ["current", "latest", "update_available"],
|
||||
"properties": {
|
||||
"current": {
|
||||
"type": "string",
|
||||
"description": "Current version string",
|
||||
"example": "v2.10.1",
|
||||
"nullable": true
|
||||
},
|
||||
"latest": {
|
||||
"type": "string",
|
||||
"description": "Latest version string",
|
||||
"example": "v2.13.4",
|
||||
"nullable": true
|
||||
},
|
||||
"update_available": {
|
||||
"type": "boolean",
|
||||
"description": "Whether there's an update available",
|
||||
"example": true
|
||||
}
|
||||
}
|
||||
}
|
||||
26
backend/schema/paths/version/check/get.json
Normal file
26
backend/schema/paths/version/check/get.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"operationId": "checkVersion",
|
||||
"summary": "Returns any new version data from github",
|
||||
"tags": ["public"],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "200 response",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"examples": {
|
||||
"default": {
|
||||
"value": {
|
||||
"current": "v2.12.0",
|
||||
"latest": "v2.13.4",
|
||||
"update_available": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"schema": {
|
||||
"$ref": "../../../components/check-version-object.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -293,6 +293,11 @@
|
||||
"$ref": "./paths/tokens/post.json"
|
||||
}
|
||||
},
|
||||
"/version/check": {
|
||||
"get": {
|
||||
"$ref": "./paths/version/check/get.json"
|
||||
}
|
||||
},
|
||||
"/users": {
|
||||
"get": {
|
||||
"$ref": "./paths/users/get.json"
|
||||
|
||||
Reference in New Issue
Block a user