Skip to content

Commit 9cfa29d

Browse files
committed
fix: admin actions functions
1 parent 81a5ee8 commit 9cfa29d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frontend/src/store/actions/adminActions.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ export const ADMIN_AUTH_SUCCESS = "ADMIN_AUTH_SUCCESS";
1818
export const DELETE_PACKAGE_SUCCESS = "DELETE_PACKAGE_SUCCESS";
1919
export const DELETE_PACKAGE_ERROR = "DELETE_PACKAGE_ERROR";
2020

21-
export const adminAuth = (uuid) => async (dispatch) => {
21+
export const adminAuth = (accessToken) => async (dispatch) => {
2222
// Make an api call to authenticate admin
2323
let formData = new FormData();
24-
formData.append("uuid", uuid);
2524

2625
try {
2726
let result = await axios({
@@ -30,6 +29,7 @@ export const adminAuth = (uuid) => async (dispatch) => {
3029
data: formData,
3130
headers: {
3231
"Content-Type": "multipart/form-data",
32+
Authorization: `Bearer ${accessToken}`,
3333
},
3434
});
3535

@@ -157,7 +157,7 @@ export const deleteNamespace = (namespace, uuid) => async (dispatch) => {
157157

158158
export const deletePackage =
159159
(namespacename, packagename, uuid) => async (dispatch) => {
160-
// Make an api call to delete package
160+
// Make an api call to delete package
161161
let formData = new FormData();
162162

163163
formData.append("uuid", uuid);
@@ -204,7 +204,7 @@ export const deletePackage =
204204

205205
export const deleteRelease =
206206
(namespace_name, package_name, version, uuid) => async (dispatch) => {
207-
// Make an api call to delete package release
207+
// Make an api call to delete package release
208208
let formData = new FormData();
209209

210210
formData.append("uuid", uuid);

0 commit comments

Comments
 (0)