Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Accept pings from UI
Browse files Browse the repository at this point in the history
  • Loading branch information
cnevinc committed Oct 17, 2019
1 parent 5b88e5a commit fed1833
Showing 1 changed file with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
import org.springframework.web.bind.annotation.*;

import javax.inject.Inject;
import java.util.*;
import java.time.DateTimeException;
import java.time.ZoneId;
import java.util.*;

import static org.springframework.web.bind.annotation.RequestMethod.*;

@Log4j2
@RestController
public class MissionController {

private static final String PINGS_SEPARATER = ",";

@Inject
private MissionService missionService;

Expand Down Expand Up @@ -143,11 +145,19 @@ public ResponseEntity createMissionForm(
}
MissionCreateRequest request = new MissionCreateRequest();
ArrayList<MissionCreateData> missionList = new ArrayList<>();
ArrayList<String> pingList = new ArrayList<>();
List<String> pingList = null;
HashMap<String, Object> params = new HashMap<>();
params.put("totalDays", totalDays);
params.put("message", Arrays.asList(messages));
pingList.add(pings);

final String[] split = pings.split(PINGS_SEPARATER);
if (split.length > 0) {
pingList = Arrays.asList(split);
} else {
pingList = new ArrayList<>();
pingList.add(pings);
}

MissionCreateData mCreated = new MissionCreateData(
missionName,
titleId,
Expand Down

0 comments on commit fed1833

Please sign in to comment.