Task as resource instead of directly calling REST from the controller