mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-02-22 10:48:35 -06:00
refactor ttl endpoint path, add /team/ttl to docs
This commit is contained in:
@@ -609,7 +609,7 @@ class NetworkService {
|
||||
*/
|
||||
async updateChecksTTL(config) {
|
||||
return this.axiosInstance.put(
|
||||
`/checks/ttl`,
|
||||
`/checks/team/ttl`,
|
||||
{ ttl: config.ttl },
|
||||
{
|
||||
headers: {
|
||||
|
||||
@@ -1669,6 +1669,58 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/checks/team/ttl": {
|
||||
"put": {
|
||||
"tags": ["checks"],
|
||||
"description": "Update check TTL",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UpdateCheckTTLBody"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SuccessResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"422": {
|
||||
"description": "Unprocessable Content",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1833,6 +1885,15 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UpdateCheckTTLBody": {
|
||||
"type": "object",
|
||||
"required": ["ttl"],
|
||||
"properties": {
|
||||
"ttl": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ router.delete(
|
||||
);
|
||||
|
||||
router.put(
|
||||
"/ttl",
|
||||
"/team/ttl",
|
||||
isAllowed(["admin", "superadmin"]),
|
||||
checkController.updateChecksTTL
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user