litmus-proxy module

Signed-off-by: chandresh pancholi <chandresh.pancholi@navi.com>
This commit is contained in:
chandresh pancholi
2021-10-07 14:06:21 +05:30
parent 3c5bacbcee
commit c31cc33348
6 changed files with 73 additions and 17 deletions

View File

@@ -5,6 +5,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
@@ -15,8 +16,8 @@ public class MockController {
private final Litmus litmus;
@GetMapping("/mock")
public String test() {
var result = litmus.isEnabled("test-offer");
public String test(@RequestParam("experiment") String experiment) {
var result = litmus.isEnabled(experiment);
log.info("result ----> {}", result);
return "result ==> " + result;