asvae / laravel-api-tester

Test your routes without hassle
http://laravel-api-tester.asva.by/
MIT License
354 stars 52 forks source link

it works for me with : if (route !== null) { #38

Closed eric-chenavaz closed 6 years ago

eric-chenavaz commented 6 years ago

https://github.com/asvae/laravel-api-tester/blob/7d446d4fe308576427c1cb340b662da6d5339e0c/resources/assets/js/components/routes/routes-module.js#L22

asvae commented 6 years ago

Errm. And what's the problem exactly?

eric-chenavaz commented 6 years ago

Hi. When i select an endpoint from the route liste. First the endoint info on the top right appears. In the same second a query is sent to the server with the route_info and 1s after the response is reveive. The infos in the box disapear. So when select a enpoint the info just blink a few second.

It cause by the test on the received info from the server. If i block the query route_info or catch it and return nothing. The info box work fine with the standelone data. But info are not dynamicaly updated.

Cordialy

⁣Eric Chenavaz ​

Le 13 Nov 2017 à 11:29, à 11:29, asvae notifications@github.com a écrit:

Errm. And what's the problem exactly?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/asvae/laravel-api-tester/issues/38#issuecomment-343877181

asvae commented 6 years ago

Sorry for late answer. If I understood your issue correctly, 1) You select route. 2) You see some info about the route. 3) Response for route info is received. 4) Info disappears.

Is that correct?

I think this is easy to fix. Will take a look on weekend.

asvae commented 6 years ago

Finally got some free time.

The route info fetching process goes as follows: 1) We retrieve full list of routes with minimal info. 2) On click we send another request to get detailed info for selected route.

As far as I understand, the problem is that for some route data is present in list but request for detailed info fails for some reason.

To get repro I require more info on the route in question. Closing the issue until then.

eric-chenavaz commented 6 years ago

Hi, Sorry for not responding in time...

The issue is visible just reading the code :

SET_REQUEST_INFO: (state, route) => { if (route === null) { state.currentRoute = route return }

...Set variable only if it is NULL !!! Why ?

I think you just tape === instead !==

If the request return information, then i use it.

SET_REQUEST_INFO: (state, route) => { if (route !== null) { state.currentRoute = route return }

Eric Chenavaz 06 51 14 34 30

----- Mail original -----

De: "asvae" notifications@github.com À: "asvae/laravel-api-tester" laravel-api-tester@noreply.github.com Cc: "chenavazer" eric.chenavaz@free.fr, "Author" author@noreply.github.com Envoyé: Dimanche 18 Mars 2018 19:54:09 Objet: Re: [asvae/laravel-api-tester] it works for me with : if (route !== null) { (#38)

Closed #38 . — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or mute the thread .