Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when sending /api/pireps/prefile #149

Closed
vangelisb opened this issue Jan 21, 2018 · 4 comments
Closed

Error when sending /api/pireps/prefile #149

vangelisb opened this issue Jan 21, 2018 · 4 comments
Labels

Comments

@vangelisb
Copy link

image
When sending prefile request error ocures on website part

also please confirm response is correct

{"user_id":1,"state":0,"status":0,"id":"Pdyo3QjgE6Va","updated_at":"2018-01-21 08:30:05","created_at":"2018-01-21 08:30:05","airline":null,"dpt_airport":null,"arr_airport":null,"position":null}

@nabeelio
Copy link
Owner

nabeelio commented Jan 21, 2018 via email

@vangelisb
Copy link
Author

[2018-01-21 17:22:06] dev.INFO: PIREP Prefile, user 1 {"_airline_id":"1","_aircraft_id":"1","_flight_id":"flightid_1","_dpt_airport_id":"KAUS","_arr_airport_id":"KJFK","_level":"25000","_planned_flight_time":"120","_route":"KAUS SID TNV J87 IAH J2 LCH J22 MEI J239 ATL J52 AJFEB J14 BYJAC Q60 JAXSN J14 COLIN J61 HUBBS J55 SIE STAR KJFK","user":"[object] (App\Models\User: {"id":1,"name":"Admin User","email":"admin@phpvms.net","api_key":"testadminapikey","airline_id":1,"rank_id":1,"country":"us","home_airport_id":"KAUS","curr_airport_id":"KJFK","last_pirep_id":"pirepid_3","flights":3,"flight_time":0,"balance":null,"timezone":"America/Chicago","status":0,"state":1,"active":null,"last_ip":"62.1.92.13","created_at":"2018-01-21 08:25:58","updated_at":"2018-01-21 14:58:11","deleted_at":null})"}
[2018-01-21 17:22:06] dev.INFO: PIREP PREFILED
[2018-01-21 17:22:06] dev.INFO: 1aMwrOM9673d

This is from the log in laravel

also i saw that when the prefile happens a record is added in mysql pireps table where only an id exists

image

@nabeelio nabeelio added bug and removed bug labels Jan 21, 2018
@nabeelio
Copy link
Owner

Do you have the request that you sent in? The fields with the underscore in front are interesting, looks like the null fields are also weird. I'm assuming the IDs and stuff you passed in were ok, right?

@nabeelio
Copy link
Owner

This error seems to indicate that the airline ID isn't correct. I'll add some more checks in the API code that makes sure those IDs are valid, but let me know if that seems like it's the case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants