import { Injectable } from "@angular/core";
import { HttpClient } from "@angular/common/http";
import { environment } from "src/environments/environment";

@Injectable({
  providedIn: "root",
})
export class FileService {
  constructor(private http: HttpClient) {}

  getFile(name: string) {
    return this.http.get(`${environment.api.url}/files/${name}`, {
      responseType: "blob",
    });
  }
}
