Update To edit app details

matu6968 2024-11-21 01:57:18 +01:00
parent ff9db30b36
commit 364bd67a86

@ -33,39 +33,74 @@ If it is successful:
Status code: 200
```
If there is no token or a invalid token:
If there is no token specified in header:
```
Unauthorized
{
"error": "No authorization header"
}
Status code: 401
```
If there is no app ID specified:
If there is a invalid token:
```
App ID is required
{
"error": "Invalid token"
}
Status code: 401
```
If there is no metadata in multipart body specified:
```
{
"error": "Metadata is required"
}
Status code: 400
```
If there is a invalid app ID specified:
If there metadata file in multipart body is invalid:
```
App not found
{
"error": "Invalid metadata format"
}
Status code: 400
```
If there is a problem while saving apps.json onto the host, while making a directory to the uploaded file or while saving the uploaded file: (likely cause is directory where the binary is located is set to read only)
```
{
"error": "Failed to save file"
}
Status code: 500
```
If there is a invalid multipart body:
```
{
"error": "Invalid request body"
}
Status code: 400
```
If there is no or invalid app ID specified:
```
{
"error": "App not found"
}
Status code: 404
```
If there is a problem while saving the uploaded file: (likely cause is directory where the binary is located is set to read only)
```
Failed to save file
Status code: 500
If using a HTTP request other then `POST`:
```
If there is a problem while saving apps.json onto the host: (likely cause is directory where the binary is located is set to read only)
```
Failed to save app data
{
"error": "Method not allowed. Only POST is supported for this endpoint."
}
Status code: 500
```
If there is invalid multipart body:
```
Invalid form data
Status code: 400
Status code: 405
```