|
|
@ -26,6 +26,8 @@ import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
|
import org.springframework.context.ApplicationEventPublisherAware;
|
|
|
|
import org.springframework.context.ApplicationEventPublisherAware;
|
|
|
|
|
|
|
|
import org.springframework.http.HttpEntity;
|
|
|
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.validation.Errors;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
@ -65,13 +67,15 @@ public class RetailValidationController implements ApplicationEventPublisherAwar
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/devices/{devType}/register")
|
|
|
|
@PostMapping("/devices/{devType}/register")
|
|
|
|
public JSONObject register(@RequestBody String registeration, @PathVariable String devType) {
|
|
|
|
public JSONObject register(HttpEntity<String> registerationEntity, @PathVariable String devType) {
|
|
|
|
return deviceSupport.register(devType, registeration);
|
|
|
|
Assert.notNull(registerationEntity.getBody(), "Registeration is Empty");
|
|
|
|
|
|
|
|
return deviceSupport.register(devType, registerationEntity.getBody());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/devices/{devType}/manage/register")
|
|
|
|
@PostMapping("/devices/{devType}/manage/register")
|
|
|
|
public JSONObject manageRegister(@RequestBody String registeration, @PathVariable String devType) {
|
|
|
|
public JSONObject manageRegister(HttpEntity<String> registerationEntity, @PathVariable String devType) {
|
|
|
|
return manageDeviceSupport.register(devType, registeration);
|
|
|
|
Assert.notNull(registerationEntity.getBody(), "Registeration is Empty");
|
|
|
|
|
|
|
|
return manageDeviceSupport.register(devType, registerationEntity.getBody());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/sign_in_check")
|
|
|
|
@PostMapping("/sign_in_check")
|
|
|
|