Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant update node description with application API #3624

Closed
1 task done
belinazzi opened this issue Sep 15, 2021 · 0 comments
Closed
1 task done

Cant update node description with application API #3624

belinazzi opened this issue Sep 15, 2021 · 0 comments
Labels
not confirmed Report seems plausible but requires additional testing or 3rd part confirmation.

Comments

@belinazzi
Copy link

Is there an existing issue for this?

  • I have searched the existing issues before opening this issue.

Current Behavior

Endpoint: /api/application/nodes/x

Object "description" are ignored on PATCH request

Expected Behavior

The endpoint must accept "description" update.

Solution: Add 'description', to /app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php

` public function rules(array $rules = null): array
{
return collect($rules ?? Node::getRules())->only([
'public',
'name',
'description',
'location_id',
'fqdn',
'scheme',
'behind_proxy',
'memory',
'memory_overallocate',
'disk',
'disk_overallocate',
'upload_size',
'daemonListen',
'daemonSFTP',
'daemonBase',
])->mapWithKeys(function ($value, $key) {
$key = ($key === 'daemonSFTP') ? 'daemonSftp' : $key;

        return [snake_case($key) => $value];
    })->toArray();
}

`

Steps to Reproduce

Make a PATCH request to /api/application/nodes/x

Description will not change

with:

                {
                "name": "NODETEST",
                "description": "TESTEXX",
                "location_id": 1,
                "fqdn": "nodetest.domain.com",
                "scheme": "https",
                "behind_proxy": false,
                "maintenance_mode": false,
                "memory": 6144,
                "memory_overallocate": -1,
                "disk": 750000,
                "disk_overallocate": -1,
                "upload_size": 100,
                "daemon_listen": 443,
                "daemon_sftp": 2022
                }

Panel Version

1.6.0

Wings Version

1.5.0

Error Logs

No response

@belinazzi belinazzi added the not confirmed Report seems plausible but requires additional testing or 3rd part confirmation. label Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not confirmed Report seems plausible but requires additional testing or 3rd part confirmation.
Projects
None yet
Development

No branches or pull requests

2 participants