Skip to content

Commit

Permalink
Merge pull request #74 from bcgov/File-Retrieval-Bug-Fix
Browse files Browse the repository at this point in the history
BUG FIX: Correct Access Token Call
  • Loading branch information
dbarkowsky authored Jul 5, 2023
2 parents da38b3d + 9731cb3 commit 55b58a9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 0 additions & 2 deletions api/controllers/requests-api-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,6 @@ export const updateRequestState = async (req: Request, res: Response) => {
})
: [];

console.log(refinedApprovals);

// Create setting object
const newProperties = {
approvals: refinedApprovals,
Expand Down
3 changes: 1 addition & 2 deletions app/src/components/custom/uploaders/FileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ const FileUpload = (props: FileUploadProps) => {
// Assumption: no file for this request will have exactly the same upload date down to the millisecond
const retrieveFile = async () => {
const { BACKEND_URL } = Constants;
console.log(files[index].date);
const axiosReqConfig = {
url: `${BACKEND_URL}/api/requests/${id}/files?date=${files[index].date}`,
method: `get`,
headers: {
Authorization: `Bearer ${authState.access_token}`,
Authorization: `Bearer ${authState.accessToken}`,
},
};
const file: string = await axios(axiosReqConfig).then((response) => response.data.file);
Expand Down

0 comments on commit 55b58a9

Please sign in to comment.