@RequestMapping(path = "/0/admin/applications/{appId}/block", method = RequestMethod.POST)
	public ResponseEntity<Boolean> updateDeveloperApplication(
			@PathVariable String appId
	) {
		// Let's get the user from principal and validate the userId against it.
		User user = userService.findAuthenticatedUser();
		if (user == null)
			return new ResponseEntity<>(HttpStatus.FORBIDDEN);
		// TODO check and ensure user is Moderator role
		Application application = applicationService.findApplication(appId);
		if (application == null){
			logger.debug("Application not found pre condition failed");
			return new ResponseEntity<>(HttpStatus.PRECONDITION_FAILED);
		}	
		// TODO what if Application was already blocked?
		Boolean result = applicationService.blockApplication(application);
		return new ResponseEntity<>(result, HttpStatus.OK);
	}
@RequestMapping(path = "/0/admin/applications/{appId}/block", method = RequestMethod.POST)
	public ResponseEntity<Boolean> updateDeveloperApplication(
			@PathVariable String appId
	) {
	
		User user = userService.findAuthenticatedUser();
		if (user == null)
			return new ResponseEntity<>(HttpStatus.FORBIDDEN);
	
		Application application = applicationService.findApplication(appId);
		if (application == null){
			logger.debug("Application not found pre condition failed");
			return new ResponseEntity<>(HttpStatus.PRECONDITION_FAILED);
		}	
	
		Boolean result = applicationService.blockApplication(application);
		return new ResponseEntity<>(result, HttpStatus.OK);
	}
@requestmapping(path = "/0/admin/applications/{appid}/block", method = requestmethod.post) public responseentity<boolean> updatedeveloperapplication( @pathvariable string appid ) { user user = userservice.findauthenticateduser(); if (user == null) return new responseentity<>(httpstatus.forbidden); application application = applicationservice.findapplication(appid); if (application == null){ logger.debug("application not found pre condition failed"); return new responseentity<>(httpstatus.precondition_failed); } boolean result = applicationservice.blockapplication(application); return new responseentity<>(result, httpstatus.ok); }