export default function($resource) {
  "ngInject";
  return $resource('/api/v1/fields/:id/', { id: '@id' },
    {
       filter: {
           method: "POST",
           url: "/api/v1/fields/filter",
           isArray: true
       },
          create: {
          method: "POST",
          url: "/api/v1/fields"
        },
       withResources: {
           method: "GET",
           url: "/api/v1/fields/with_resources",
           isArray: true
      },
          save: {
          method: "PUT",
          url: "/api/v1/fields/:id",
          params: {
            id: '@id'
          }
        }
    });
};
