{"size": 680, "ext": "js", "max_stars_repo_path": "src/shared/attached-files-services.js", "max_stars_repo_name": "Pobx/vue-apartment-app", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/shared/attached-files-services.js", "max_issues_repo_name": "Pobx/vue-apartment-app", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/shared/attached-files-services.js", "max_forks_repo_name": "Pobx/vue-apartment-app", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.1851851852, "max_line_length": 80, "alphanum_fraction": 0.6588235294}
import axios from "axios";
import { API } from "./api-base";
import { CONFIG } from "./api-config";

export function setAttachedFile(params) {
  if (params.id == 0) {
    return axios.post(`${API}/renters-attached-files/create`, params, CONFIG);
  } else {
    // return axios.put(
    //   `${API}/renters-attached-files/update-attached-file-by-renters-id`,
    //   params
    // );
  }
}

export function getAttachedFilesByRentersId(id) {
  return axios.get(`${API}/renters-attached-files-by-renters-id/${id}`, CONFIG);
}

export function removeAttachedFiles(params) {
  return axios.put(
    `${API}/renters-attached-files/remove-attached-file`,
    params,
    CONFIG
  );
}
