Enterprise-CMCS/macpro-mako

View on GitHub
react-app/src/api/getAttachmentUrl.ts

Summary

Maintainability
A
0 mins
Test Coverage
F
33%
import { API } from "aws-amplify";

export const getAttachmentUrl = async (
  id: string,
  bucket: string,
  key: string,
  filename: string
) => {
  const response = await API.post("os", "/getAttachmentUrl", {
    body: {
      id,
      bucket,
      key,
      filename,
    },
  });
  return response.url as string;
};