File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 77 [ #1442 ] ( https://github.com/nextcloud/cookbook/pull/1442 ) @christianlupus
88- Reorder arrows are no longer hidden
99 [ #1446 ] ( https://github.com/nextcloud/cookbook/pull/1446 ) @christianlupus
10+ - Add network logging for responses, not only requests
11+ [ 1405] ( https://github.com/nextcloud/cookbook/pull/1405 ) @MarcelRobitaille
1012
1113### Maintenance
1214- Update dependency for GitHub pages builder
Original file line number Diff line number Diff line change @@ -10,18 +10,29 @@ const baseUrl = `${generateUrl("apps/cookbook")}/webapp`
1010// Add a debug log for every request
1111instance . interceptors . request . use ( ( config ) => {
1212 Vue . $log . debug (
13- `Making "${ config . method } " request to "${ config . url } "` ,
13+ `[axios] Making "${ config . method } " request to "${ config . url } "` ,
1414 config
1515 )
1616 const contentType = config . headers [ config . method ] [ "Content-Type" ]
1717 if ( ! [ "application/json" , "text/json" ] . includes ( contentType ) ) {
1818 Vue . $log . warn (
19- `Request to "${ config . url } " is using Content-Type "${ contentType } ", not JSON`
19+ `[axios] Request to "${ config . url } " is using Content-Type "${ contentType } ", not JSON`
2020 )
2121 }
2222 return config
2323} )
2424
25+ instance . interceptors . response . use (
26+ ( response ) => {
27+ Vue . $log . debug ( "[axios] Received response" , response )
28+ return response
29+ } ,
30+ ( error ) => {
31+ Vue . $log . warn ( "[axios] Received error" , error )
32+ return Promise . reject ( error )
33+ }
34+ )
35+
2536axios . defaults . headers . common . Accept = "application/json"
2637
2738function createNewRecipe ( recipe ) {
You can’t perform that action at this time.
0 commit comments