mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Update tracker get token api
This commit is contained in:
parent
11fa624b39
commit
6b3294bd60
@ -634,14 +634,7 @@ public interface DeviceManagementService {
|
||||
response = ErrorResponse.class)
|
||||
})
|
||||
@Path("/traccar-user-token")
|
||||
Response getTraccarUserToken(
|
||||
@ApiParam(
|
||||
name = "name",
|
||||
value = "Boolean flag indicating whether to include device-info (location, application list etc) \n" +
|
||||
" to the device object.",
|
||||
required = false)
|
||||
@QueryParam("name")
|
||||
String name);
|
||||
Response getTraccarUserToken();
|
||||
|
||||
@GET
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
|
||||
@ -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")){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user