@@ -18,10 +18,9 @@ export const ADMIN_AUTH_SUCCESS = "ADMIN_AUTH_SUCCESS";
1818export const DELETE_PACKAGE_SUCCESS = "DELETE_PACKAGE_SUCCESS" ;
1919export 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
158158export 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
205205export 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