|
|
|
@ -469,12 +469,14 @@ public class DeviceManagementServiceImpl implements DeviceManagementService {
|
|
|
|
|
@GET
|
|
|
|
|
@Override
|
|
|
|
|
@Path("/traccar-user-token")
|
|
|
|
|
public Response getTraccarUserToken(@QueryParam("name") String name) {
|
|
|
|
|
public Response getTraccarUserToken() {
|
|
|
|
|
|
|
|
|
|
if (HttpReportingUtil.isTrackerEnabled()) {
|
|
|
|
|
JSONObject obj = new JSONObject(DeviceAPIClientServiceImpl.returnUser(name));
|
|
|
|
|
String loggedUserName = CarbonContext.getThreadLocalCarbonContext().getUsername();
|
|
|
|
|
JSONObject obj = new JSONObject(DeviceAPIClientServiceImpl.returnUser(loggedUserName));
|
|
|
|
|
|
|
|
|
|
log.info("=================");
|
|
|
|
|
log.info(loggedUserName);
|
|
|
|
|
log.info(obj.toString());
|
|
|
|
|
log.info("==================");
|
|
|
|
|
if(obj.has("error")){
|
|
|
|
|