diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-05-25 17:33:36 +0200 |
---|---|---|
committer | Javier Sánchez Parra <jsanchez@soleta.eu> | 2022-05-26 15:15:52 +0200 |
commit | c0573b9ef05bc1c22a6b5b71c2f73ba18a8696f1 (patch) | |
tree | a872689bc46cba3dd52a4bf3ace35d5d7a440c10 /src/rest.c | |
parent | b86b6e1443a6dfd21fa1520f7c4421a44d3595f3 (diff) |
#915 Set repository on image creation
Assign to the image the repository indicated in the JSON body instead of
a default one.
Diffstat (limited to 'src/rest.c')
-rw-r--r-- | src/rest.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2127,7 +2127,9 @@ int og_json_parse_create_image(json_t *element, sizeof(params->image.name)); params->flags |= OG_REST_PARAM_NAME; } else if (!strcmp(key, "repository")) { - err = og_json_parse_string(value, ¶ms->repository); + err = og_json_parse_string_copy(value, + (char *)¶ms->image.repo_ip, + sizeof(params->image.repo_ip)); params->flags |= OG_REST_PARAM_REPO; } else if (!strcmp(key, "clients")) { err = og_json_parse_clients(value, params); |