feat: make internal objectbackend methods private

This commit is contained in:
Huskydog9988
2025-04-10 19:57:08 -04:00
parent 521838f0a7
commit d5fb89c3a1
8 changed files with 67 additions and 32 deletions
@@ -13,7 +13,10 @@ export default defineEventHandler(async (h3) => {
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag
const etagRequestValue = h3.headers.get("If-None-Match");
const etagActualValue = await objectHandler.fetchHash(id);
const etagActualValue = await objectHandler.fetchHashWithWithPermissions(
id,
userId
);
if (etagRequestValue !== null && etagActualValue === etagRequestValue) {
// would compare if etag is valid, but objects should never change
setResponseStatus(h3, 304);
@@ -14,7 +14,10 @@ export default defineEventHandler(async (h3) => {
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/ETag
const etagRequestValue = h3.headers.get("If-None-Match");
const etagActualValue = await objectHandler.fetchHash(id);
const etagActualValue = await objectHandler.fetchHashWithWithPermissions(
id,
userId
);
if (etagRequestValue !== null && etagActualValue === etagRequestValue) {
// would compare if etag is valid, but objects should never change
setResponseStatus(h3, 304);