|
|
|
@ -26,6 +26,7 @@ import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
import org.springframework.web.bind.annotation.ResponseStatus; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.thingsboard.server.common.data.AdminSettings; |
|
|
|
import org.thingsboard.server.common.data.Customer; |
|
|
|
import org.thingsboard.server.common.data.EntitySubtype; |
|
|
|
import org.thingsboard.server.common.data.EntityType; |
|
|
|
@ -409,6 +410,18 @@ public class EdgeController extends BaseController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('TENANT_ADMIN')") |
|
|
|
@RequestMapping(value = "/edge/sync", method = RequestMethod.POST) |
|
|
|
public void syncEdge(@RequestBody EdgeId edgeId) throws ThingsboardException { |
|
|
|
try { |
|
|
|
edgeId = checkNotNull(edgeId); |
|
|
|
Edge edge = checkEdgeId(edgeId, Operation.READ); |
|
|
|
syncEdgeService.sync(edge); |
|
|
|
} catch (Exception e) { |
|
|
|
throw handleException(e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@RequestMapping(value = "/license/checkInstance", method = RequestMethod.POST) |
|
|
|
@ResponseBody |
|
|
|
public Object checkInstance(@RequestBody Object request) throws ThingsboardException { |
|
|
|
|