project-rainstorm / rainstorm

The easiest way to own your cloud. Your data. Your cloud. Rainstorm.
Other
10 stars 5 forks source link

[API] process user defined variables #64

Closed nullcount closed 4 years ago

nullcount commented 4 years ago

Many services will allow users to define variables that get passed to the docker-compose file.

We need an endpoint like POST /service/<service_name>/vars which accepts an array of variables like this:

[
   {
       name: "SERVER_TYPE",
       value: "SPIGOT"
   }
]

just make it print the array for now... I can take care of the rest, I just don't know how to post/get params like this in flask.

Then it needs to update the settings.json field called var_fields with the updated fields. It will do this by recreating the var_fields array and writing to file with the new values.