feat: add head method for file endpoint
This commit is contained in:
parent
583dd11df2
commit
58cc2aaa14
1 changed files with 2 additions and 10 deletions
|
|
@ -18,15 +18,7 @@ import prisma from "../db";
|
||||||
import { notFoundError } from "../utils/error";
|
import { notFoundError } from "../utils/error";
|
||||||
import HttpError from "../interfaces/http-error";
|
import HttpError from "../interfaces/http-error";
|
||||||
import HttpStatus from "../interfaces/http-status";
|
import HttpStatus from "../interfaces/http-status";
|
||||||
import {
|
import { deleteFile, fileLocation, getFile, getPresigned, listFile, setFile } from "../utils/minio";
|
||||||
deleteFile,
|
|
||||||
fileLocation,
|
|
||||||
getFile,
|
|
||||||
getFilePresigned,
|
|
||||||
listFile,
|
|
||||||
setFile,
|
|
||||||
} from "../utils/minio";
|
|
||||||
import { RequestWithUser } from "../interfaces/user";
|
|
||||||
|
|
||||||
@Tags("Quotation")
|
@Tags("Quotation")
|
||||||
@Route("api/v1/quotation/{quotationId}/payment")
|
@Route("api/v1/quotation/{quotationId}/payment")
|
||||||
|
|
@ -111,7 +103,7 @@ export class QuotationPayment extends Controller {
|
||||||
@Path() name: string,
|
@Path() name: string,
|
||||||
) {
|
) {
|
||||||
return req.res?.redirect(
|
return req.res?.redirect(
|
||||||
await getFilePresigned("head", fileLocation.quotation.payment(quotationId, paymentId, name)),
|
await getPresigned("head", fileLocation.quotation.payment(quotationId, paymentId, name)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue