Project: add declfile, decltype, declvalue to API

This makes it possible to create declarative projects via a PUT request, and
also exposes the currently-configured values to GET requests.
This commit is contained in:
Cole Helbling
2021-05-01 23:27:47 -07:00
parent e9a06113c9
commit ad13d13436
5 changed files with 70 additions and 23 deletions

View File

@ -157,9 +157,9 @@ sub updateProject {
, enabled => defined $c->stash->{params}->{enabled} ? 1 : 0
, hidden => defined $c->stash->{params}->{visible} ? 0 : 1
, owner => $owner
, declfile => trim($c->stash->{params}->{declfile})
, decltype => trim($c->stash->{params}->{decltype})
, declvalue => trim($c->stash->{params}->{declvalue})
, declfile => trim($c->stash->{params}->{declarative}->{file})
, decltype => trim($c->stash->{params}->{declarative}->{type})
, declvalue => trim($c->stash->{params}->{declarative}->{value})
});
if (length($project->declfile)) {
$project->jobsets->update_or_create(