ITHC: enforce representation blob proxy ownership and admin access
This commit is contained in:
@@ -2,10 +2,7 @@
|
||||
import { useState } from "react";
|
||||
import Link from "next/link";
|
||||
import { bytesToSize } from "../../../components/utils";
|
||||
import {
|
||||
deleteAwaitingSubmissionsFromBlob,
|
||||
getRepsFromBlobProxy
|
||||
} from "../../../actions/services/documentService";
|
||||
import { deleteAwaitingSubmissionsFromBlob } from "../../../actions/services/documentService";
|
||||
import { sendRepCompleteMessage } from "../../../actions/services/portalService";
|
||||
import { consoleLogger } from "../../../actions/core/logger";
|
||||
|
||||
@@ -42,7 +39,19 @@ export default function StorageTab({ data, repCompleteCount }) {
|
||||
return data;
|
||||
})
|
||||
.then(() => {
|
||||
getRepsFromBlobProxy(containerID)
|
||||
fetch("/api/admin/getrepsblobproxy", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ container: containerID })
|
||||
})
|
||||
.then((response) => {
|
||||
if (!response.ok) {
|
||||
throw new Error(
|
||||
"Unable to refresh representations"
|
||||
);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then((data) => {
|
||||
setMyRepresentations(data);
|
||||
setMyRepresentationsDetails(data);
|
||||
|
||||
Reference in New Issue
Block a user