Skip to content

Commit

Permalink
Allow spaces also in PUT /api/groups
Browse files Browse the repository at this point in the history
Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Dec 24, 2024
1 parent daa4fc1 commit c7358da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ static int api_list_write(struct ftl_conn *api,
if(json_ret != 0)
return json_ret;

bool spaces_allowed = false;
// Spaces are allowed in groups
const bool spaces_allowed = listtype == GRAVITY_GROUPS;
bool allocated_json = false;
if(api->method == HTTP_POST)
{
Expand Down Expand Up @@ -218,7 +219,6 @@ static int api_list_write(struct ftl_conn *api,

case GRAVITY_GROUPS:
{
spaces_allowed = true;
cJSON *json_name = cJSON_GetObjectItemCaseSensitive(api->payload.json, "name");
if(cJSON_IsString(json_name) && strlen(json_name->valuestring) > 0)
{
Expand Down

0 comments on commit c7358da

Please sign in to comment.